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