Beispiel #1
0
 public void Assign(AsyncEventClient client, byte[] data)
 {
     Client           = client;
     Data             = data;
     OutstandingCount = data.Length;
     TransferredCount = 0;
 }
 public EzClient(ITcpSocket clientSocket)
 {
     Socket         = clientSocket;
     Account        = "Nothilvien";
     _packetBuilder = new EzPacketBuilder();
     if (Socket is AsyncEventClient)
     {
         AsyncEventClient client = (AsyncEventClient)Socket;
         Identity = client.Socket.RemoteEndPoint.ToString();
     }
     else
     {
         Identity = GetHashCode().ToString();
     }
 }
Beispiel #3
0
        public EzClient(ITcpSocket clientSocket)
        {
            _packetBuilder = new PacketBuilder();

            if (Socket is AsyncEventClient)
            {
                AsyncEventClient client = (AsyncEventClient)Socket;
                Identity = client.Socket.RemoteEndPoint.ToString();
            }
            else
            {
                Identity = GetHashCode().ToString();
            }

            Socket = clientSocket;
            Player = new Player();
        }