
10 Jul
2008
10 Jul
'08
8:37 a.m.
You can use tcp::socket::available() http://www.boost.org/doc/libs/1_35_0/doc/html/boost_asio/reference/basic_str... or: boost::asio::socket_base::bytes_readable command(true); socket.io_control(command); std::size_t bytes_readable = command.get(); 2008/7/10, Jean-Sebastien Stoezel <js.stoezel@gmail.com>:
Hi,
Is there a way to read from a synchronous TCP socket without blocking the calling thread? Like using a time out, or checking how many bytes are present on the socket before reading?
Thanks, Jean
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users