예제 #1
0
        public void Stop()
        {
            if (this.GameListener != null)
            {
                this.GameListener.Stop();
            }
            this.GameListener = null;

            foreach (GameConnection connection in this.Connections.Values)
            {
                connection.Disconnect("Server shutdown");
            }
        }
예제 #2
0
        public SocketManager(string ip, int port)
        {
            this.Connections = new ConcurrentDictionary <long, GameConnection>();

            this.GameListener = new GameListener(this, ip, port);
        }