示例#1
0
 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, "]" }));
     }
 }
示例#3
0
 internal void CreateAndStartClient(uint ClientId, ref TcpConnection Connection)
 {
     this.Session[ClientId] = new GameClient(ClientId, ref Connection);
     this.Session[ClientId].StartConnection();
 }
示例#4
0
 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;
     }
 }
示例#5
0
 public GameClient(uint ClientId, ref TcpConnection pConnection)
 {
     this.Id = ClientId;
     this.Connection = pConnection;
 }