private void HandleDisconnect() { Status = ConnectionStatus.Disconnected; IsConnected = false; UDPTransport.Disconnect(); connectionID = -1; if (ServerPeer != null) { ServerPeer.Dispose(); ServerPeer.IsConnected = false; } Disconnected?.Invoke(); }
/// <summary> /// Disconnect the <see cref="ClientSocket"/> from the <see cref="ServerSocket"/>. /// </summary> public void Disconnect() { UDPTransport.Disconnect(); HandleDisconnect(); }
private void OnApplicationQuit() { UDPTransport.Disconnect(); }