Perform an IO control command on the acceptor.
template< typename IoControlCommand> void io_control( IoControlCommand & command, asio::error_code & ec);
This function is used to execute an IO control command on the acceptor.
The IO control command to be performed on the acceptor.
Set to indicate what error occurred, if any.
Getting the number of bytes ready to read:
asio::ip::tcp::acceptor acceptor(io_context); ... asio::ip::tcp::acceptor::non_blocking_io command(true); asio::error_code ec; socket.io_control(command, ec); if (ec) { // An error occurred. }