next up previous contents
Next: ntohl Up: Methods Previous: htonl   Contents

htons

Description

Converts a 16-bit integer from host to TCP/IP network byte order. Static.


Syntax

socket.htons(hostshort)


Parameters

hostshort
Integer. Represents a 16-bit number in host byte order.


Returns

Integer




Copyright ©2000-2010 Shanghai TopCMM Software Technologies. All Rights Reserved.