TBlockSocket.RecvPacket
TBlockSocket
function RecvPacket(Timeout: Integer): string; virtual;
Unit
blcksock
Description
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, and may be freely combine with RecvString or RecvBufferEx method.
Because before call this function you don't know size of received data, returned data is stored in dynamic size string.
This method is preffered for reading from stream sockets (like TCP).
See also:
RecvBufferEx, RecvString