private void _handleDisconnection(IPEndPoint endpoint) { _connections[endpoint].StopSendLoop(); _connections.Remove(endpoint); Disconnection?.Invoke(endpoint); }
public void DisconnectClient() { socket.Close(); stream.Dispose(); socket.Dispose(); Disconnection?.Invoke(); }
public void Disconnect() { if (!m_bConnect) { return; } //서버에도 연결을 끊었다는 신호를 보내주어야 한다. Disconnection ds = new Disconnection(); ds.Type = (int)PacketType.EXIT; Packet.Serialize(ds).CopyTo(this.sendBuffer, 0); Send(); m_bConnect = false; m_Client.Close(); m_Stream.Flush(); m_Stream.Close(); lvwFiles.Clear(); trvDir.Nodes.Clear(); btnServerConnect.Text = "서버연결"; btnServerConnect.ForeColor = Color.Black; //Message("상대방과 연결 중단"); }
private void CloseClientSocket(NetConnection connection) { try { connection.Socket.Close(CloseTimeout); } catch (Exception) // throws if client process has already closed { } Disconnection?.Invoke(this, connection); }
public void CloseConnection(IPEndPoint endpoint) { if (!_connections.ContainsKey(endpoint)) { throw new InvalidOperationException("Client is not connected"); } Send(new[] { (byte)MessageIdentifiers.DisconnectionNotification }, endpoint); _connections[endpoint].StopSendLoop(); _connections.Remove(endpoint); Disconnection?.Invoke(endpoint); }
internal void RaiseDisconnection(string reason) { Disconnection?.Invoke(this, reason); }
// Token: 0x0600001B RID: 27 RVA: 0x000024CE File Offset: 0x000006CE internal void CloseCallback(ServerClient client) { clients.Remove(client); Disconnection?.Invoke(client); }
public void SetDCHandler(Disconnection Method) { DCHandler = Method; }
// Token: 0x0600000E RID: 14 RVA: 0x0000228E File Offset: 0x0000048E private void CloseCallback(object sender, CloseEventArgs e) { Disconnection?.Invoke(); }