htons
htons converts a u_short IPv4 address in host byte-ordering to TCP/IP network byte order.
Syntax
u_short WSAAPI htons(
u_short hostshort
);
Parameters
hostshort
A 16 bit number in host byte order
Return Value
The value supplied in the hostshort parameter in TCP/IP network byte order.
Requirements
Minimum Supported Version | RTX64 2013 |
Header | Winsock2.h |
Library | RtTcpip.lib |