"git@developer.sourcefind.cn:OpenDAS/vision.git" did not exist on "65cdaeaba83366381b8e7b9fd9850b7c0ca5e636"
Commit 58ee5c66 authored by Davis King's avatar Davis King
Browse files

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 ...@@ -56,7 +56,8 @@ class serv : public server::kernel_1a_c
stream.tie(&stream); stream.tie(&stream);
char ch; 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 // get the next character from the client
ch = stream.get(); 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