Ejemplo n.º 1
0
        public void Add(byte gsId, GameAuthConnection connection)
        {
            if (!_gameServers.ContainsKey(gsId))
            {
                connection.SendPacket(new RegisterGs(false));
                return;
            }

            var gameServer = _gameServers[gsId];

            gameServer.Connection = connection;
            connection.GameServer = gameServer;
            connection.AddAttribute("gsId", gameServer.Id);
            gameServer.Connection.SendPacket(new RegisterGs(true));

            _log.Info("GameServer {0} registered with success.", gameServer.Id);
        }
Ejemplo n.º 2
0
 public void Add(GameAuthConnection connection)
 {
     _connections.TryAdd(connection.SessionId, connection);
 }