Internet Direct (Indy)
Home
PreviousUpNext
TIdStack.NetworkToHost Method (Word)

Converts a numeric value to its host byte order representation.

Pascal
function NetworkToHost(
    AValue: Word
): Word; virtual; abstract; overload;
Parameters 
Description 
AValue 
Numeric value to convert to its Network byte order. 

Word - Host byte order for the numeric value.

NetworkToHost is an overloaded abstract virtual function in TIdStack that specifies methods used to access the ntohs() and ntohl() APIs in a protocol stack implementation. 

NetworkToHost is used to convert the numeric value in AValue from its Network byte order (Big-Endian) to its platform -specific byte order. 

The return value is the numeric value in AValue converted to its host byte order representation. 

NetworkToHost is implemented in TIdStack to handle byte order conversion required for IPv6 IP addresses. NetworkToHost variants that operate on numeric values require access to overridden NetworkToHost methods that use the ntohs() and ntohl() APIs in the protocol stack implementation for the platform or operating system hosting the Indy library.

NetworkToHost

Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.