Python - creating byte arrays help
Posted on 2014-09-23
I have my TCP connection, server listen code fleshed out.
On the client, though,
I'd like to create a byte array of a certain length, with a tag number.
How do I do this?
byte data = new byte // is that the correct size for a TCP network game HELO message? smaller? can be 3 . . .
data = HELO_MSG byte
data = client number byte #1
data = client number byte #2
That's all? no need for more than 256 clients..so, one byte.
The client port, address, etc is gathered from this message.
I can send and listen, but I don't know how to create a blank byte of x size and fill it with certain numbers?
byte data = new byte
What about in game messages, that can be hundreds of bytes?