コード例 #1
0
 public void Assign(AsyncEventClient client, byte[] data)
 {
     Client           = client;
     Data             = data;
     OutstandingCount = data.Length;
     TransferredCount = 0;
 }
コード例 #2
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();
     }
 }
コード例 #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();
        }