ssize_t qSocketGets ( char *  str,
int  sockfd,
size_t  nbytes,
int  timeoutms 
)

Read line from the stream. New-line characters(CR, LF ) will not be stored into buffer.

Parameters:
str data buffer pointer
sockfd socket descriptor
nbytes read size
timeoutms wait timeout milliseconds
Returns:
the length of data readed on success, or 0 on timeout, or -1 if an error(ex:socket closed) occurred.
Since:
8.1R
Note:
be sure the return length is not the length of stored data. it means how many bytes are readed from the socket. so the new-line characters will be counted, but not be stored.

Definition at line 220 of file qSocket.c.


Generated on Mon Mar 26 07:00:51 2018 for JSOC_Documentation by  doxygen 1.5.7.1