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