TBlockSocket.RecvBuffer
TBlockSocket     

function RecvBuffer(Buffer: Pointer; Length: Integer): Integer; virtual;

Unit
blcksock

Description
Note: This is low-lever receive function. You must be sure if data is waiting for read before call this function for avoid deadlock!

Waits until allocated buffer is filled by received data. Returns number of data received, which equals to LENGTH value under normal operation. If it is not equal the communication channel is possibly broken.

On stream oriented sockets if is received 0 bytes, it mean 'socket is closed!"

On datagram socket is readed first waiting datagram.


See also:
CanRead, Connect, MaxBandwidth, MaxRecvBandwidth, PeekBuffer, RecvBufferEx, RecvBufferFrom, SetRecvTimeout, SetTimeout, SizeRecvBuffer, WaitingData