SeasideResearch.LibCurlNet.Easy.SSLCtxDelegate C# (CSharp) Method

SSLCtxDelegate() private static method

private static SSLCtxDelegate ( IntPtr ctx, IntPtr parm ) : int
ctx System.IntPtr
parm System.IntPtr
return int
        private static int SSLCtxDelegate(IntPtr ctx, IntPtr parm)
        {
            int ok = (int)CURLcode.CURLE_OK;
            GCHandle gch = (GCHandle)parm;
            Easy easy = (Easy)gch.Target;
            if (easy == null)
                return ok;
            if (easy.m_pfSSLContext == null)
                return ok;  // keep going
            SSLContext context = new SSLContext(ctx);
            return (int)easy.m_pfSSLContext(context, easy.m_sslContextData);
        }