Wait for the acceptor to become ready to read, ready to write, or to have pending error conditions.
asio::error_code wait( wait_type w, asio::error_code & ec);
This function is used to perform a blocking wait for an acceptor to enter a ready to read, write or error condition state.
Specifies the desired acceptor state.
Set to indicate what error occurred, if any.
Waiting for an acceptor to become readable.
asio::ip::tcp::acceptor acceptor(io_service); ... asio::error_code ec; acceptor.wait(asio::ip::tcp::acceptor::wait_read, ec);