Sending the array of arbitrary length through a socket. Endianness.
Posted
by Negai
on Stack Overflow
See other posts from Stack Overflow
or by Negai
Published on 2010-03-25T20:33:37Z
Indexed on
2010/03/25
20:43 UTC
Read the original article
Hit count: 295
Hi everyone,
I'm fighting with socket programming now and I've encountered a problem, which I don't know how to solve in a portable way. The task is simple : I need to send the array of 16 bytes over the network, receive it in a client application and parse it. I know, there are functions like htonl, htons and so one to use with uint16 and uint32. But what should I do with the chunks of data greater than that?
Thank you.
© Stack Overflow or respective owner