Exemple #1
0
        public static PacketListenerLoop Spawn(TcpConnection conn, PacketHandler handler)
        {
            PacketListenerLoop packetListenerLoop = new PacketListenerLoop(conn, handler);

            Task.Run(() => packetListenerLoop.Run());
            return(packetListenerLoop);
        }
Exemple #2
0
 public ClientInfo(Guid clientUniqueId, Client client, PacketListenerLoop listenerLoop, int timeoutValue = 10000)
 {
     ClientUniqueId   = clientUniqueId;
     Client           = client;
     ListenerLoop     = listenerLoop;
     LastPingReceived = DateTime.Now;
     TimeoutValue     = timeoutValue;
 }