public void AddAuthedUser(User user)
        {
            Debug.Assert(m_ConnectedUserList.IndexOf(user) > -1);

            if (m_ConnectedUserList.TryRemove(user))
            {
            }
            else
            {
                Debug.Assert(false);
            }

            if (m_AuthedUserDict.TryRemove(user.UserID, out User tmp_user))
            {
                Debug.Assert(false);
                FreeUser(tmp_user);
            }

            m_AuthedUserDict.TryAdd(user.UserID, user);

            LogManager.Debug("Add authed user. UserID = " + user.UserID);
        }
Exemple #2
0
        public void AddAuthedGameServer(GameServer game_s)
        {
            Debug.Assert(m_ConnectedGameServerList.IndexOf(game_s) > -1);

            if (m_ConnectedGameServerList.TryRemove(game_s))
            {
            }
            else
            {
                Debug.Assert(false);
            }

            if (m_AuthedGameServerDict.TryRemove(game_s.GameServerID, out GameServer tmp_game_s))
            {
                Debug.Assert(false);
                FreeGameServer(tmp_game_s);
            }

            m_AuthedGameServerDict.TryAdd(game_s.GameServerID, game_s);

            LogManager.Debug("Add authed game server. Game server ID = " +
                             game_s.GameServerID.ToString());
        }