private void StartGame() { state.Value = CSState.GameInProgress; server.StopListening(); CSLogger.Log($"Game started."); lock (clientsLocker) { clients.ForEach(c => { if (!c.IsInGame && c.Id != gmId.Value) { c.Disconnect(); } }); } }
public void Shutdown() { logger.Write <Server>("Shutting down server."); connectionListener.StopListening(); communicator.CloseConnectionToAllClients(); }