Пример #1
0
        /// <summary>
        /// 创建socket监听&服务组件
        /// </summary>
        /// <returns></returns>
        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 = HttpSdk.Create_HP_HttpServer(pListener);
            if (PServer == IntPtr.Zero)
            {
                return(false);
            }

            IsCreate = true;

            return(true);
        }