%SS_NTOHS
Convert short integers from network to host byte order
WTSupported in traditional Synergy on Windows
|
WNSupported in Synergy .NET on Windows
|
USupported on UNIX
|
VSupported on OpenVMS
|
integer = %SS_NTOHS(netshort)
Return value
integer
Returns a short integer in host byte order. (i2)
Arguments
netshort
A short integer in network byte order. (i2)
Discussion
%SS_NTOHS converts 16-bit unsigned (short) integers from network byte order to host byte order.
Host byte order is the format in which bytes are ordered internally on a specific host. Network byte order is the format in which data bytes are supposed to be transmitted through a network. All hosts on a network must send data in network byte order. If your host does not have an internal data representation format identical to the network byte order, you must use %SS_HTONL.
In the Synergy socket API, all IP address and port arguments (in_addr and in_port) are in host byte order, and should not be converted to network byte order. The %SS_NTOHS function should only be used when sending portable data over the network. |