Normally when sending data through sockets its done at the byte level, you enter a string of say 10 characters, and set size to 10, and 10 bytes are sent (not counting other layer headers and such). But what if I only want to send 3 bits, followed by a string of 5 bytes, lets say. How would I go about doing this?
The current way I know of to send data is using Send() but I'm guessing there's perhaps another way. A good example of this is if a certain packet needs to have fields that look like this:
header: 1 byte
flag1: 1 bit
flag2: 1 bit
size:2 bytes
dynamic string: string of varying size
flag 3: 1 bit
The current way I know of to send data is using Send() but I'm guessing there's perhaps another way. A good example of this is if a certain packet needs to have fields that look like this:
header: 1 byte
flag1: 1 bit
flag2: 1 bit
size:2 bytes
dynamic string: string of varying size
flag 3: 1 bit