TBlockSocket.RecvPacket
TBlockSocket     

function RecvPacket(Timeout: Integer): string; virtual;

Unit
blcksock

Description
Note: This is high-level receive function. It using internal LineBuffer and you can combine this function freely with other high-level functions.

Method reads all data waiting for read. If no data is received within TIMEOUT (in milliseconds) period, LastError is set to WSAETIMEDOUT. Methods serves for reading unknown size of data.

Because before call this function you don't know size of received data, returned data is stored in dynamic size binary string.

This method is preffered for reading from stream sockets (like TCP).


See also:
CanRead, LineBuffer, RecvBufferEx, RecvByte, RecvString, RecvTerminated