Data.DbxSocketChannelNative.TDBXIdTCPLayer.Read
Delphi
function Read(const Buffer: TArray<Byte>; const Offset: Integer; const Count: Integer): Integer; override;
C++
virtual int __fastcall Read(const System::DynamicArray<System::Byte> Buffer, const int Offset, const int Count);
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
| function | public | Data.DbxSocketChannelNative.pas Data.DbxSocketChannelNative.hpp |
Data.DbxSocketChannelNative | TDBXIdTCPLayer |
Description
Reads bytes into a buffer.
The Read 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 Read 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 Read method internally calls the ReadData method to read the bytes into the buffer.