| Home | Libraries | People | FAQ | More

##### basic_socket_acceptor::io_control (1 of 2 overloads)

Perform an IO control command on the acceptor.

    template<
        typename IoControlCommand>
    void io_control(
        IoControlCommand & command);

This function is used to execute an IO control command on the acceptor.

###### Parameters

command

  The IO control command to be performed on the acceptor.

###### Exceptions

boost::system::system_error

  Thrown on failure.

###### Example

Getting the number of bytes ready to read:

    boost::asio::ip::tcp::acceptor acceptor(io_service);
    ...
    boost::asio::ip::tcp::acceptor::non_blocking_io command(true);
    socket.io_control(command);