示例#1
0
        public override void Destroy()
        {
            Stop();
            if (pClient != IntPtr.Zero)
            {
                SSLHttpSdk.Destroy_HP_HttpsClient(pClient);
                pClient = IntPtr.Zero;
            }
            if (pListener != IntPtr.Zero)
            {
                HttpSdk.Destroy_HP_HttpClientListener(pListener);
                pListener = IntPtr.Zero;
            }

            IsCreate = false;
        }
示例#2
0
        public override void Destroy()
        {
            Stop();

            if (pServer != IntPtr.Zero)
            {
                SSLHttpSdk.Destroy_HP_HttpsServer(pServer);
                pServer = IntPtr.Zero;
            }
            if (pListener != IntPtr.Zero)
            {
                HttpSdk.Destroy_HP_HttpServerListener(pListener);
                pListener = IntPtr.Zero;
            }

            IsCreate = false;
        }
示例#3
0
        protected override bool CreateListener()
        {
            if (IsCreate == true || pListener != IntPtr.Zero || pServer != IntPtr.Zero)
            {
                return(false);
            }

            pListener = HttpSdk.Create_HP_HttpServerListener();
            if (pListener == IntPtr.Zero)
            {
                return(false);
            }
            pServer = SSLHttpSdk.Create_HP_HttpsServer(pListener);
            if (pServer == IntPtr.Zero)
            {
                return(false);
            }

            IsCreate = true;

            return(true);
        }
示例#4
0
        protected override bool CreateListener()
        {
            if (IsCreate == true || pListener != IntPtr.Zero || pClient != IntPtr.Zero)
            {
                return(false);
            }

            pListener = HttpSdk.Create_HP_HttpClientListener();
            if (pListener == IntPtr.Zero)
            {
                return(false);
            }

            pClient = SSLHttpSdk.Create_HP_HttpsClient(pListener);
            if (pClient == IntPtr.Zero)
            {
                return(false);
            }

            IsCreate = true;

            return(true);
        }