Beispiel #1
0
        /// <summary>
        /// 初使化通道
        /// </summary>
        protected void InitializeChannel()
        {
            if (_IsCreate == true || pListener != IntPtr.Zero || pServer != IntPtr.Zero)
            {
                return;
            }

            pListener = SDK.Create_HP_UdpServerListener();
            if (pListener == IntPtr.Zero)
            {
                return;
            }

            pServer = SDK.Create_HP_UdpServer(pListener);
            if (pServer == IntPtr.Zero)
            {
                return;
            }

            _IsCreate = true;
            InitializeCallback();
        }