...one of the most highly
regarded and expertly designed C++ library projects in the
world. — Herb Sutter and Andrei
Inherited from basic_socket.
Perform an IO control command on the socket.
template< typename IoControlCommand> void io_control( IoControlCommand & command);
This function is used to execute an IO control command on the socket.
The IO control command to be performed on the socket.
Thrown on failure.
Getting the number of bytes ready to read:
boost::asio::ip::tcp::socket socket(my_context); ... boost::asio::ip::tcp::socket::bytes_readable command; socket.io_control(command); std::size_t bytes_readable = command.get();