示例#1
0
        public ConnectServer GetServer(int serial)
        {
            ConnectServer user = null;

            ServerSessionMap.TryGetValue(serial, out user);
            return(user);
        }
示例#2
0
        public ERROR_CODE AddServer(int sessionID, string name)
        {
            if (ServerSessionMap.ContainsKey(sessionID))
            {
                return ERROR_CODE.ADD_SERVER_DUPLICATION_SESSION;
            }

            var server = new ConnectServer();
            server.SetInfo(sessionID, name);

            ServerSessionMap.Add(sessionID, server);

            return ERROR_CODE.NONE;
        }
示例#3
0
        public ERROR_CODE AddServer(int sessionID, string name)
        {
            if (ServerSessionMap.ContainsKey(sessionID))
            {
                return(ERROR_CODE.ADD_SERVER_DUPLICATION_SESSION);
            }

            var server = new ConnectServer();

            server.SetInfo(sessionID, name);

            ServerSessionMap.Add(sessionID, server);

            return(ERROR_CODE.NONE);
        }