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