void CallConnect(TcpClient client) { NetworkSystem.CallMainThread(() => { connections.Add(new Connection(client, this, NewTcpId(client.Client.RemoteEndPoint as IPEndPoint))); }); }
public void CloseConnection(Connection conn) { NetworkSystem.CallMainThread(() => { conn.Destroy(); connections.Remove(conn); }); }
static void CallShutdownServer() => NetworkSystem.CallMainThread(NetworkSystem.ShutdownServer);