Commit 58ee5c66 authored by Davis King's avatar Davis King

Changed this example so it recommends using stream.peek()!=EOF instead of stream.good()

to detect the end of the stream.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%404011
parent 706b343d
......@@ -56,7 +56,8 @@ class serv : public server::kernel_1a_c
stream.tie(&stream);
char ch;
while (stream.good())
// Loop until we hit the end of the stream. This happens when the connection terminates.
while (stream.peek() != EOF)
{
// get the next character from the client
ch = stream.get();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment