, I when using winsock control through getdata access to a string of bytes stored in the ByteData array When I will be according to redata. Text ByteData= Become garbled
Tcpclient. GetData ByteData vbByte, bytesTotal ByteLenght=bytesTotal Redata. Text=ByteData displayed when the code Redata. Text=ByteData (Bytelenght - 1) is displayed when the byte stream over a single byte after the decimal number
I want to show that a string of bytes
Such as I have received a string of bytes for the 30 36 00 21 2 f 61 49 47 39 5 a 50 31 32 75 50 52 2 f 6 b, 66, 62 5 64 65 6 d f, 2 f, 75 f, 73, 65, 72, 2 f, 73 f, 64, 61, 74 61 31 38 2 e 2 d 32 39 30 30 30 31 0 a 2 e 39 35 and 31 34 38
I want to extract the byte stream after several bytes 35 and 31 32 2 e 39 34 38 display should be 2.951148
When I use Redata. Text is stil ByteData= Use the Redata. Text=ByteData (Bytelenght - 1) is displayed when the last byte 38 corresponding display is 8
CodePudding user response:
1. Can be done with strconv byte array and the transformation of the string; 2. Best can check the data sending and receiving data all contents are consistent;