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