Internet Direct (Indy)
Home
PreviousUpNext
CopyTIdNetworkWord Function

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

Pascal
procedure CopyTIdNetworkWord(
    const ASource: Word; 
    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. 

CopyTIdNetworkWord is a procedure used to convert a binary value in ASource representing a Word 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 Word value. 

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

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

CopyTIdNetworkWord 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. 

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

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.