xHarbour Reference Documentation > Function Reference |
Reads one block of data until an end-of-block marker is detected.
INetRecvEndblock( <pSocket> , ; [<cEndOfBlock>], ; [@<nBytesRead>] , ; [<nMaxLength>] , ; [<nIncrement>] ) --> cBlock
The function returns a character string read from the socket without trailing end-of-block marker. If an error occurs, the return value is NIL and a socket error is set.
INetRecvEndblock() blocks the current thread until an end-of-block character sequence is read from <pSocket>. Since it is unknown how many data arrives before the end-of-block marker, the function incrementally increases memory allocation by <nIncrement> bytes until the end-of-block marker is detected, or until <nMaxLength> bytes are read. When no end-of-block marker is detected, or when the socket is prematurely closed, the function returns NIL.
Note: if <cEndOfBlock> is omitted, INetRecvEndblock() works exactly like INetRecvLine().
See also: | INetAccept(), INetConnect(), INetErrorCode(), INetRecv(), INetRecvLine(), INetSend(), INetSendAll() |
Category: | Internet functions , Sockets functions , xHarbour extensions |
Source: | vm\INet.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
http://www.xHarbour.com