What is the role of htons() in socket programming?
Converts port number to host byte order
Converts port number to network byte order
Hashes the port number
Assigns a port number automatically
This question is part of this quiz :
Inter process and network communication