Topic Path: Symbol Reference > Classes > TIdStack Class > TIdStack Methods > NetworkToHost Method > NetworkToHost Method (Int64)
TIdStack.NetworkToHost Method (Int64)

Converts a numeric value to its host byte order representation.

function NetworkToHost(
    AValue: Int64
): Int64; virtual; abstract; overload;
Numeric value to convert to its Network byte order. 

Int64 - 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 to its platform-specific host 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.


Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.