Hey, I was wondering what you guys use for parsing bytes in networking applications. Such as writeInt32, readInt32, or read<long>, etc. Do you just use a function that converts data to a char array, converts via hex (<< >> | &) taking into account endianness (I'm using big endian). The networking library RakNet uses a templated read/write methods. Is there a Boost library abstracted for just this purpose (perhaps to use with Aasio)? or any decent C++ class?

For instance, if I'm passing variables to and from Python with struct.pack, and DON'T have struct's defined to memcpy in C++. I want to read the variables out of the stream. Before you say stringstream, at least by default stringstream just serializes and doesn't actually do any bit conversion, it just reads until spaces and such, and therefore I find unreliable for this (datatype conversions work well).

I might be missing something here, I just couldn't find any common solution. Just a lot of random C functions (some working, some not).