public void Disconnect() { try { foreach (var pair in ClientList) { TcpClient client = pair.Key as TcpClient; client.Close(); } ClientList.Clear(); if (TcpClient != null) { TcpClient.Close(); } if (TcpListner != null) { TcpListner.Stop(); } } catch (Exception ex) { ServerEvent.ErrorLog("Disconnect", ex.Message); } }
public void Disconnect() { try { foreach (var pair in ClientList) { TcpClient client = pair.Key as TcpClient; IpPoint = (IPEndPoint)client.Client.RemoteEndPoint; ClientIP = IpPoint.Address + ":" + IpPoint.Port; DisplayText(ClientIP + " 님의 연결을 해제합니다."); client.Close(); } ClientList.Clear(); if (TcpClient != null) { TcpClient.Close(); } if (TcpListner != null) { TcpListner.Stop(); } } catch (Exception ex) { ServerEvent.ErrorLog("Disconnect", ex.Message); } }
public void Disconnect() { if (TcpClient != null) { TcpClient.Close(); } if (TcpListner != null) { TcpListner.Stop(); } }
public void Disconnect() { try { if (TcpClient != null) { TcpClient.Close(); } if (TcpListner != null) { TcpListner.Stop(); } } catch (Exception ex) { } }
public void Disconnect() { try { if (TcpClient != null) { TcpClient.Close(); } if (TcpListner != null) { TcpListner.Stop(); } } catch (Exception ex) { ServerEvent.ErrorLog("Disconnect", ex.Message); } }
public void Disconnect() { try { if (TcpClient != null) { TcpClient.Close(); } if (TcpListner != null) { TcpListner.Stop(); } } catch (Exception ex) { MessageBox.Show("Disconnect : \r\n" + ex.ToString()); } }