예제 #1
0
        public static SslContext GetInst()
        {
            if (Instance == null)
            {
                Instance = new SslContext();
            }
            if (!s_bsslInit)
            {
                Instance = null;
                Log.Logger.Instance.WriteLog("初始化失败!");
            }

            if (Instance.Handle == IntPtr.Zero)
            {
                Instance = null;
                Log.Logger.Instance.WriteLog("初始化失败!");
            }
            return(Instance);
        }
예제 #2
0
 /// <summary>
 /// Calls SSL_new()
 /// </summary>
 /// <param name="ctx"></param>
 internal Ssl(SslContext ctx)
 {
     base.Construct(Native.SSL_new(ctx.Handle), true);
 }