3 ms·
You wait to peek the next byte, or EOF, and then make the choice.
by rhencke 8y ago
You wait to peek the next byte, or EOF, and then make the choice.
- marcosdumay 8y agoLine protocols do not transmit EOF (and the problem is on each line anyway). And the next byte may only come after you write something on the socket.