Internet Direct (Indy) Version 9.0.2 Beta
TIdSocketHandle.Recv
Receives data from a socket.

function Recv(var ABuf; ALen: Integer; AFlags: Integer): Integer;
Parameters
var ABuf
Buffer for the read operation.

ALen: Integer
Length of the read buffer.

AFlags: Integer
Flags to modify socket options.

Returns
Integer - Number of bytes read.

Description
Recv is an Integer function used to read incoming data from a connected socket descriptor.

Recv is used on streaming sockets, to read all available data up to the size of the read buffer. Recv can also retrieve Out-of-Band data on sockets configured using Id_SO_OOBINLINE in SetSockOpt. If no data is available on the socket, Recv waits for data to arrive.

AFlags can be used to alter the behavior of the Recv method beyond the options specified in SetSockOpt. The supported values of AFlags includes: