public void Stop() { if (this.GameListener != null) { this.GameListener.Stop(); } this.GameListener = null; foreach (GameConnection connection in this.Connections.Values) { connection.Disconnect("Server shutdown"); } }
public SocketManager(string ip, int port) { this.Connections = new ConcurrentDictionary <long, GameConnection>(); this.GameListener = new GameListener(this, ip, port); }