Converts binary values from network byte order to host-specific byte order for the data type.
procedure CopyBytesToHostWord( const ASource: TIdBytes; const ASourceIndex: Integer; var VDest: Word );
Parameters |
Description |
ASource |
Array of bytes to convert. |
ASourceIndex |
Initial byte position for the conversion. |
VDest |
Storage for the converted values. |
CopyBytesToHostWord is a procedure used to convert the bytes representing a Word value in ASource from their representation in Network byte order to the byte ordering used on the platform hosting the Indy library.
CopyBytesToHostWord is used to convert the binary values in ASource, and calls the NetworkToHost method in the TIdStack descendant for the platform to access the ntohs, ntols, htons, and htons functions implemented for the protocol stack.
ASourceIndex indicates the initial bye position in ASource to be read and converted in the method.
ADest is the Word value used to store bytes after conversion using the NetworkToHost method in TIdStack.
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
|
Post feedback to the Indy Docs Newsgroup.
|