Am new to socket programming and I came up to this Network Byte Conversion mechanisms the htons
and the htonl
methods.
The documentations said that they convert either a 16-bit or a 32-bit network number from a host network byte order to an Internet byte order.
What happens when the host and network share the same order?
And how do you determine whether you should use them or not?