luige34
asked on
Byte Array Conversion
I'm trying to read data after making a winsock call. the data I get back is a byte array. the problem i'm having is the data is mixed data types. I can't just convert it all to strings as it has integer, byte, string, and float datatypes. I'm not sure how to go about parsing this byte array to get the data i need. I beleve the data is chr(0) seperated but the problem is the integer can have a 0 value. I'm not sure how to tell the two apart in a byte array. any help would be great
the format is . . .
--------------------------
Server responds with the following packet:
(int32) -1
(byte) ASCII 'D' (players response, S2A_PLAYER)
(byte) active client count
for each active client
(byte) client number / index
(string) player name
(int32) client's frag total
(float32) client's total time in-game
the format is . . .
--------------------------
Server responds with the following packet:
(int32) -1
(byte) ASCII 'D' (players response, S2A_PLAYER)
(byte) active client count
for each active client
(byte) client number / index
(string) player name
(int32) client's frag total
(float32) client's total time in-game
why can you dim it as "any"?
ASKER
I don't know what "any" is? Please explain.
ASKER
Oh, any only works with the Declare Statement
ASKER
Didn't Answer Question.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.