Exemplo n.º 1
0
        /// <summary>
        /// 读取应答信息
        /// </summary>
        public static AdbResponse ReadResponse(Socket socket)
        {
            var reply = new byte[4];

            Read(socket, reply);
            AdbResponse res = new AdbResponse(reply.GetString(Encoding.UTF8));

            res.IsOkay = reply[0] == (byte)'O' && reply[1] == (byte)'K' &&
                         reply[2] == (byte)'A' && reply[3] == (byte)'Y';
            return(res);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 读取应答信息
        /// </summary>
        public AdbResponse ReadResponse()
        {
            var reply = new byte[4];

            Read(reply);
            string      data = Encoding.UTF8.GetString(reply);
            AdbResponse res  = new AdbResponse(data)
            {
                IsOkay = reply[0] == (byte)'O' && reply[1] == (byte)'K' &&
                         reply[2] == (byte)'A' && reply[3] == (byte)'Y'
            };

            return(res);
        }