/// <summary> /// 终止服务并释放资源 /// </summary> public override void Destroy() { Stop(); if (pClient != IntPtr.Zero) { HPSocketSdk.Destroy_HP_TcpPackClient(pClient); pClient = IntPtr.Zero; } if (pListener != IntPtr.Zero) { HPSocketSdk.Destroy_HP_TcpClientListener(pListener); pListener = IntPtr.Zero; } IsCreate = false; }