I have two little endian system while transferring data between them it happens in network byte order i.e, big endian but still i receive data properly. Does it mean that, the compiler automatically take cares of this and convert it?
Asked
Active
Viewed 437 times
1 Answers
0
No, it doesn't. But you network stack likely does.
See also Wikipedia article on endiannness and more specifically RFC1700.
Essentially some influential people decided that your network byte order should in most cases be Big Endian. Mind you that this doesn't necessarily has to apply to all layers, it's just that in most cases network byte order is going to be Big Endian and your system hopefully has enough abstraction that you don't have to care.
Your actual platform is also an important factor, so in a way the compiler does that care of it up to a certain point because in most common scenarios you won't really care.