Topic Path: Symbol Reference > Functions > CopyTIdNetworkCardinal Function
ContentsIndexHome
PreviousUpNext
CopyTIdNetworkCardinal Function

Converts binary values from host byte order to network byte order for the data type.

File
procedure CopyTIdNetworkCardinal(
    const ASource: Cardinal; 
    var VDest: TIdBytes; 
    const ADestIndex: Integer
);
Parameters 
Description 
ASource 
Data type to convert.
 
VDest 
Destination where converted byte values are stored.
 
ADestIndex 
Position in the destination where converted byte values are stored. 

CopyTIdNetworkCardinal is a procedure used to convert a binary value in ASource representing a Cardinal data type from its representation in host-specific byte order to the network byte order. 

VDest is the array of bytes where the data type is stored after converting the byte order for the Cardinal value. 

VDestIndexs is the initial position in VDest where the converted byte values wil be stored. 

CopyTIdNetworkCardinal uses the HostToNetowrk method in the TIdStack descendant for the platform hosting the Indy library to perform byte order conversion. 

CopyTIdNetworkCardinal is used in the implementation of protocol clients like TIdSNTP and TIdFSP where the byte ordering in integer values differ in the usage and transmission formats of the data type. 

CopyTIdNetworkCardinal is not declared in the IdGlobal.pas unit because unit references needed for TIdStack and other descendants are not already included in that unit.

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