Link to home
Start Free TrialLog in
Avatar of luige34
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
Avatar of master01
master01

why can you dim it as "any"?
Avatar of luige34

ASKER

I don't know what "any" is?  Please explain.
Avatar of luige34

ASKER

Oh, any only works with the Declare Statement
Avatar of luige34

ASKER

Didn't Answer Question.
ASKER CERTIFIED SOLUTION
Avatar of bob_obob
bob_obob

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial