I was learning about simple socket programs and had come across these, I wanted to know what is the difference between htons and htonl, even ntohs and ntohl.
htons host to network short
ntohs network to host short
htonl host to network long
ntohl network to host long
long is 32 bits. short is 16 bits.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With