Modify LobbyServer
This commit is contained in:
@@ -38,6 +38,15 @@ namespace LobbyServer
|
||||
}
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
Console.WriteLine("Stopping LobbyServer...");
|
||||
|
||||
ScoresManager.Save();
|
||||
|
||||
Console.WriteLine("LobbyServer stopped");
|
||||
}
|
||||
|
||||
public void ClientLoop(TcpClient client)
|
||||
{
|
||||
Console.WriteLine($"Client connected: {client.Client.RemoteEndPoint}");
|
||||
@@ -49,6 +58,7 @@ namespace LobbyServer
|
||||
try
|
||||
{
|
||||
var packet = stream.Receive();
|
||||
Console.WriteLine(packet);
|
||||
|
||||
switch (packet.Command)
|
||||
{
|
||||
@@ -71,6 +81,7 @@ namespace LobbyServer
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine($"Client disconnected: {e.Message}");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user