htons
The Windows
Sockets htons function converts a u_short from host to TCP/IP
network byte order.
u_short htons (
u_short hostshort |
|
); |
|
Parameters
hostshort
[in] A 16-bit
number in host byte order.
Remarks
This routine
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
htons returns the value in TCP/IP network byte order.
See Also