Port N00BS to linux

This commit is contained in:
Li 2022-07-25 19:16:21 +12:00
parent 64fed1c6c4
commit 8297c56f21
181 changed files with 282 additions and 132 deletions

19
HorseIsleServer/LibHISP/Server/GameClient.cs Normal file → Executable file
View file

@ -113,13 +113,18 @@ namespace HISP.Server
}
public static void CreateClient(object sender, SocketAsyncEventArgs e)
{
do
{
Socket eSocket = e.AcceptSocket;
if(eSocket != null)
new GameClient(eSocket);
e.AcceptSocket = null;
} while (!GameServer.ServerSocket.AcceptAsync(e));
try{
do
{
Socket eSocket = e.AcceptSocket;
if(eSocket != null)
new GameClient(eSocket);
e.AcceptSocket = null;
if(GameServer.ServerSocket == null)
return;
} while (!GameServer.ServerSocket.AcceptAsync(e));
}catch(ObjectDisposedException) {} // server shutdown
}
private void timeoutTimerTick(object state)
{