Ejemplo n.º 1
0
 /// <summary>Disconnects the client and stops all network traffic.</summary>
 private void Disconnect()
 {
     Console.WriteLine($"{tcp.socket.Client.RemoteEndPoint} has disconnected.");
     LobbyRoomsManager.ExitRoom(id);
     clientUUID = "";
     tcp.Disconnect();
 }
Ejemplo n.º 2
0
 public static void ExitRoom(int fromClient, Packet packet)
 {
     if (!Server.clients[fromClient].isTokenChecked)
     {
         Server.clients[fromClient].tcp.Disconnect();
         return;
     }
     LobbyRoomsManager.ExitRoom(fromClient);
 }