3 ms·
Yep, unfortunately a universal 'Network-Byte_order'[1] stil doesn't exist. Things like this were especially a pain with industrial network protocols that we us
by 3r1kB 10y ago
Yep, unfortunately a universal 'Network-Byte_order'[1] stil doesn't exist.
Things like this were especially a pain with industrial network protocols that we used in our applications during the transition from PowerPC to Intel on OS X. All the CFSwapInt16HostToBig() and CFSwapInt16BigToHost() stuff...
And earlier before I learned about '#pragma packed' it took me a while to find out where all these extra zeroes suddenly came from :-D
[1] https://en.wikipedia.org/wiki/Endianness#Networking https://en.wikipedia.org/wiki/Endianness#Networking