public ConnectServer GetServer(int serial) { ConnectServer user = null; ServerSessionMap.TryGetValue(serial, out user); return(user); }
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; }
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); }