![]() |
Home | Libraries | People | FAQ | More |
Close the acceptor.
void close(
boost::system::error_code & ec);
This function is used to close the acceptor. Any asynchronous accept operations will be cancelled immediately.
A subsequent call to open() is required before the acceptor
can again be used to again perform socket accept operations.
Set to indicate what error occurred, if any.
boost::asio::ip::tcp::acceptor acceptor(my_context);
...
boost::system::error_code ec;
acceptor.close(ec);
if (ec)
{
// An error occurred.
}