2 ms·
Another point is, if you use big endian on the network, and native is little endian, then if you screw up and forget to do the conversion, you catch it because
by smcameron 6y ago
Another point is, if you use big endian on the network, and native is little endian, then if you screw up and forget to do the conversion, you catch it because it breaks. If you use little endian for native and network and you screw up, you never catch it unless you run on a big endian machine. It's a way to ensure that you implemented the protocol correctly in an endian clean way. (Of course you could also reverse the sense of the macros during testing, I suppose.)