Boost
C++ Libraries
...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
This version of Boost is under active development. You are currently in the develop branch. The current version is 1.90.0.
Socket option to report aborted connections on accept.
typedef implementation_defined enable_connection_aborted;
Implements a custom socket option that determines whether or not an accept
operation is permitted to fail with boost::asio::error::connection_aborted.
By default the option is false.
Setting the option:
boost::asio::ip::tcp::acceptor acceptor(my_context); ... boost::asio::socket_base::enable_connection_aborted option(true); acceptor.set_option(option);
Getting the current option value:
boost::asio::ip::tcp::acceptor acceptor(my_context); ... boost::asio::socket_base::enable_connection_aborted option; acceptor.get_option(option); bool is_set = option.value();
Header: boost/asio/socket_base.hpp
Convenience header: boost/asio.hpp