Synopsis
CTL_STATUS_t ctl_tcp_read_line(CTL_SOCKET_t s,
                               char *str,
                               size_t size,
                               CTL_TIMEOUT_t type,
                               CTL_TIME_t timeout);
Description

ctl_tcp_read_line reads a whole line up to and including the CR and optional LF from the socket s. size is the size of the string that the line is returned in.

If the whole string cannot be placed into str, characters beyond the end of the string, up to the end of the line, are discarded.

ctl_tcp_read_line returns the number of characters that have been consumed from the socket s which may be greater than the length of the returned string or size.

See Also

ctl_tcp_look_ahead