Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 1022 Bytes

ntohs.md

File metadata and controls

42 lines (29 loc) · 1022 Bytes

Home

Function name : ntohs

Group: Windows Sockets 2 (Winsock) - Library: ws2_32


The ntohs function converts a u_short from TCP/IP network byte order to host byte order (which is little-endian on Intel processors).


Code examples:

Winsock: changing the byte ordering
Retrieving the User Datagram Protocol (UDP) listener table

Declaration:

u_short ntohs(
  u_short netshort
);  

FoxPro declaration:

DECLARE INTEGER ntohs IN ws2_32;
	INTEGER netshort  

Parameters:

netshort [in] 16-bit number in TCP/IP network byte order.


Return value:

The ntohs function returns the value in host byte order. If the netshort parameter was already in host byte order, then no operation is performed.