Data.DbxSocketChannelNative.TDBXIdTCPLayer.ReadData
Delphi
function ReadData(const Buffer: TArray<Byte>; const Offset: Integer; const Count: Integer): Integer;
C++
int __fastcall ReadData(const System::DynamicArray<System::Byte> Buffer, const int Offset, const int Count);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | protected | Data.DbxSocketChannelNative.pas Data.DbxSocketChannelNative.hpp |
Data.DbxSocketChannelNative | TDBXIdTCPLayer |
Description
Reads bytes into a buffer.
The ReadData method reads a number of bytes specified by the Count
parameter into a TBytes buffer specified by the Buffer
parameter. The Offset
parameter specifies the offset from where the bytes are stored. It is expected to be zero. The ReadData method returns a value of -1 if any error occurs.
It is assumed that the buffer has enough memory allocated to hold the number of bytes specified by Count
.
The ReadData method is internally called by the Read method. Because the ReadData method is declared as protected, it is only accessible to classes derived from Data.DbxSocketChannelNative.TDBXIdTCPLayer.