
6 Jun
2011
6 Jun
'11
11:10 a.m.
boost::asio::read(sock,b); } catch(exception& e) { cout<
"End of file" }
So your peer sends some data and closes the socket. asio::read() reads this data, and then throws the exception. What behavior would you expect? Please note that this is the *only* way this overload can complete. Otherwise, it would just block forever. http://www.boost.org/doc/libs/1_46_1/doc/html/boost_asio/reference/read/over...