API:Data.DbxSocketChannelNative.TDBXIdTCPLayer.Read

From RAD Studio API Documentation
Jump to: navigation, search

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.

Data.DbxSocketChannelNative.TDBXIdTCPLayer.Read inherits from Data.DBXCommon.TDBXCommunicationLayer.Read. All content below this line refers to Data.DBXCommon.TDBXCommunicationLayer.Read.

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.

See Also