void AddClient(UserToken token) { var e = _GatePlayerInfos.GetEnumerator(); while (e.MoveNext()) { if (e.Current.Value._UserToken._TcpClient == token._TcpClient) { Console.WriteLine("e.Current.Value._UserToken._TcpClient == token._TcpClient"); return; } } GatePlayerInfo info = new GatePlayerInfo(token); _GatePlayerInfos.Add(info.UserId, info); }
void OnConnect(UserToken token) { var info = new GatePlayerInfo(token); _GatePlayerInfos.Add(info.UserId, info); }