I'm not sure how to describe this, but i have a socket receiving data.
handler.BeginRe ceive(state.buf fer, 0, StateObject.Buf ferSize, 0, New AsyncCallback(A ddressOf ReadCallback), state)
(there's way more code offcourse.. but basicly my byte array buffer gets filled up all the time when a packet is received)
This data is put in a byte array. But this data is not ascii... it's binary. I need to read different values... similar to IO.BinaryReader .
So for example i receive this:
00 4f 61 48 40 00 80 06 67 13 c0 a8 01 64 53 74 .OaH@...g....dS t
And i need to convert this to ints, floats, singles etc.
or is there a way to receive this data as stream so i can use io.binaryreader ? that would be even better.
handler.BeginRe ceive(state.buf fer, 0, StateObject.Buf ferSize, 0, New AsyncCallback(A ddressOf ReadCallback), state)
(there's way more code offcourse.. but basicly my byte array buffer gets filled up all the time when a packet is received)
This data is put in a byte array. But this data is not ascii... it's binary. I need to read different values... similar to IO.BinaryReader .
So for example i receive this:
00 4f 61 48 40 00 80 06 67 13 c0 a8 01 64 53 74 .OaH@...g....dS t
And i need to convert this to ints, floats, singles etc.
or is there a way to receive this data as stream so i can use io.binaryreader ? that would be even better.
Comment