asio C++ library

PrevUpHomeNext

socket_base::enable_connection_aborted

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 asio::error::connection_aborted. By default the option is false.

Examples

Setting the option:

asio::ip::tcp::acceptor acceptor(io_service);
...
asio::socket_base::enable_connection_aborted option(true);
acceptor.set_option(option);

Getting the current option value:

asio::ip::tcp::acceptor acceptor(io_service);
...
asio::socket_base::enable_connection_aborted option;
acceptor.get_option(option);
bool is_set = option.value();
Requirements

Header: asio/socket_base.hpp

Convenience header: asio.hpp


PrevUpHomeNext