Quantcast
Channel: FedoraForum.org
Viewing all articles
Browse latest Browse all 36127

htons() and htonl() question?

$
0
0
I'm using Fedora on an x86 box and writing socket code. Actually, I'm porting existing socket code from a Solaris x86 to Fedora.

Should I call htons() on all port numbers and htonl() on all addresses when setting up sockets? ... when calling bind() on the server side and connect() on the client side? ... passing struct sockaddr?

---Elzbieta

Viewing all articles
Browse latest Browse all 36127

Trending Articles