/// <summary> ///校准 Tcp连接断开 /// </summary> void NetCalibrationStop() { if (upnpCalibration != null) { upnpCalibration.Stop(); upnpCalibration = null; } if (oldCalibration != null) { oldCalibration.Close(); } }
/// <summary> /// NetUNP服务终止 /// </summary> void NetUNPStop() { try { if (upnpServer != null) { upnpServer.Stop(); upnpServer.NetDataArrayArrived -= NetData_Arrived; upnpServer.ExceptionArrived -= Exception_TestArrived; upnpServer.LinkingMsg -= LinkMsg_TestArrived; upnpServer = null; } } catch (Exception ex) { MessageBox.Show(ex.Message, "NetUNPStop"); } }