Share via


htons (Windows CE 5.0)

Send Feedback

This function converts a u_short from host to TCP/IP network byte order, which is big-endian.

u_short htons(u_short hostshort);

Parameters

  • hostshort
    [in] 16-bit number in host byte order.

Remarks

This function takes a 16-bit number in host byte order and returns a 16-bit number in network byte order used in TCP/IP networks.

Return Values

This function returns the value in TCP/IP network byte order.

Requirements

OS Versions: Windows CE 1.0 and later.
Header: Winsock2.h.
Link Library: Ws2.lib.

See Also

htonl | ntohl | ntohs | WSAHtonl | WSAHtons | WSANtohl | WSANtohs

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.