Inherited from posix::basic_descriptor.
Perform an IO control command on the descriptor.
template< typename IoControlCommand> void io_control( IoControlCommand & command, asio::error_code & ec);
This function is used to execute an IO control command on the descriptor.
The IO control command to be performed on the descriptor.
Set to indicate what error occurred, if any.
Getting the number of bytes ready to read:
asio::posix::stream_descriptor descriptor(my_context); ... asio::posix::stream_descriptor::bytes_readable command; asio::error_code ec; descriptor.io_control(command, ec); if (ec) { // An error occurred. } std::size_t bytes_readable = command.get();