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