[SDL] newbie SDL_endian question
Ryan C. Gordon
icculus at clutteredmind.org
Wed Aug 14 03:26:01 PDT 2002
> I've dealt with some of this in a little bit of network code -- I'm not
> sure if "NEVER" is the best guideline.
Never _is_ the best guideline.
Either send as individual units, or pack it manually, or whatnot.
"#pragma pack()" isn't a universal solution, nor does it help with byte
swapping.
It is EASY to serialize objects when you first write disk/network code,
and it is a severe motherf***er to do it later. The bugs are subtle, hard
to find, and viscious.
You have been warned. Do it right the first time.
--ryan.
More information about the SDL
mailing list