/// <summary> /// 创建socket监听&服务组件 /// </summary> /// <returns></returns> protected override bool CreateListener() { if (IsCreate == true || pListener != IntPtr.Zero || pServer != IntPtr.Zero) { return(false); } pListener = HPSocketSdk.Create_HP_TcpServerListener(); if (pListener == IntPtr.Zero) { return(false); } pServer = HPSocketSdk.Create_HP_TcpPackServer(pListener); if (pServer == IntPtr.Zero) { return(false); } IsCreate = true; return(true); }