• Tutorials
  • Courses
  • Tracks

6

Last Updated :
Discuss
Comments

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

Share your thoughts in the comments