%SS_HTONS
Convert short integers from host to network byte order
WSupported on Windows
|
USupported on Unix
|
VSupported on OpenVMS
|
NSupported in Synergy .NET
|
integer = %SS_HTONS(hostshort)
Return value
integer
Returns a short integer in network byte order. (i2)
Arguments
hostshort
A short integer in host byte order. (i2)
Discussion
%SS_HTONS converts 16-bit (short) unsigned integers from host byte order to network 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_HTONS function should only be used when sending portable data over the network. |