internal void AddGameClient(TcpConnection Client) { if (!mToDisconnect.Contains(Client)) { mToDisconnect.Add(Client); } }
internal void HandleNewConnection(SocketInformation connectioninfo, int PreconnID) { TcpConnection connection = new TcpConnection(Convert.ToUInt32(PreconnID), connectioninfo); this.Connections[PreconnID] = connection; PhoenixEnvironment.GetGame().GetClientManager().CreateAndStartClient((uint)PreconnID, ref connection); if (PhoenixEnvironment.GetConfig().data["emu.messages.connections"] == "1") { Logging.WriteLine(string.Concat(new object[] { ">> Connection [", PreconnID, "] from [", connection.ipAddress, "]" })); } }
internal void CreateAndStartClient(uint ClientId, ref TcpConnection Connection) { this.Session[ClientId] = new GameClient(ClientId, ref Connection); this.Session[ClientId].StartConnection(); }
public void Stop() { if (this.Connection != null) { this.Connection.Dispose(); this.Connection = null; } if (this.GetHabbo() != null) { this.Habbo.OnDisconnect(); this.Habbo = null; } if (this.GetMessageHandler() != null) { this.MessageHandler.Destroy(); this.MessageHandler = null; } }
public GameClient(uint ClientId, ref TcpConnection pConnection) { this.Id = ClientId; this.Connection = pConnection; }