size_t ctl_tcp_look_ahead(CTL_SOCKET_t soc,
                          char ch);

ctl_tcp_look_ahead looks ahead to find the character ch in the received (but as yet unread) data for the socket soc.

ctl_tcp_look_ahead returns the number of characters that can be read from the socket such that the data on the socket is exhausted or the character ch is the terminating character read.

You can use ctl_tcp_look_ahead, for instance, to search for specific characters in the stream.

See Also