public void StopLocalServer() { // Note: doesn't stop accepting connections, simply stops broadcasting if (LanMode) { PingThread.Abort(); } }
public void Quit(string reason) { foreach (var channel in Channels.Values) { channel.SendQuit(this, reason); } ListenThread.Abort(); PingThread.Abort(); TcpClient.Close(); }
/// <summary> /// 关闭当前窗口执行的事件 /// </summary> private void CloseForm() { isStop = true; if (mutexRelease == 1) { ReleaseProtocolTracing(); CSAMRunning = false; } try { if (PingThread != null) { PingThread.Abort(); } } catch { } foreach (Thread td in pingList) { try { if (td != null) { td.Abort(); } } catch { } } foreach (Device dev in DeviceManger.deviceList) { if (dev.SendRexAnt) { dev.SendRexAnt = false; } } SaveData(); CSAMForm.Close(); CSAMForm.Dispose(true); }
public void End() { PingThread.Abort(); SocketHelper.EndConnection(); Program.LoginForm.Close(); }