View Single Post
 
Old 11-01-2015, 03:47 AM
Jmann84 Jmann84 is offline
Newcomer
 
Join Date: Nov 2015
Posts: 2
Default Byte conversion?

Ok I'm not really sure if I am even approaching this issue correctly as I am not 100% sure what I am dealing with in my project but I will do my best to explain.

I am working on an RTMP client project. There is one packet that I send to the server containing a unique ID. There are multiple unique ID's and the returned packet has what appears to be the unique ID put into a byte array.

Here is the outgoing packet I am sending:

Send: Return Code: 0x00000000
00000000 83 00 0B 5C 02 00 07 61 63 63 6F 75 6E 74 00 00 ...\...account..
00000010 00 00 00 00 00 00 00 05 02 00 05 34 38 32 37 32 ...........48272

and here is the incoming packet I receive back from the server:

Receive: Return Code: 0x00000000
00000000 C3 02 00 07 61 63 63 6F 75 6E 74 00 00 00 00 00 ....account.....
00000010 00 00 00 00 05 03 00 07 61 63 63 6F 75 6E 74 02 ........account.
00000020 00 09 6B 75 73 68 69 73 66 69 67 00 02 69 64 00 ..kushisfig..id.
00000030 40 E7 92 00 00 00 00 00 00 00 09 @..........

Now "kushisfig" is the account that corresponds to the unique ID "48272" that I have sent in the first packet.

What I need to do is read the "id" at the end of the packet to know what ID that account belongs to, but I am not really that familiar with byte arrays in VB6.

Any help would be greatly appreciated as I've been wracking my brain over here for hours.
Reply With Quote