WSAHtons

WSAHtons converts a u_short IPv4 address in host byte order to TCP/IP network byte order.

Syntax

Copy
int WSAAPI WSAHtons(
    [in]    SOCKET s,
    [in]    u_short hostshort,
    [out]   u_short *lpnetshort
);

Parameters

[in] s

Ignored. A descriptor identifying a socket.

[in] hostshort

A 16-bit number in host byte order.

[out] lpnetshort

Ignored. A pointer to a 16-bit buffer to receive the number in network byte order.

Return Value

The value supplied in the hostshort parameter in TCP/IP network byte order.

Requirements

Minimum supported version Header Library

wRTOS 1.0 SDK

winsock2.h

RttcpipApi.lib