Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

basic_seq_packet_socket::enable_connection_aborted

Inherited from socket_base.

Socket option to report aborted connections on accept.

typedef implementation_defined enable_connection_aborted;
Types

Name

Description

container

Determine the container for the specified elements.

rebind

Rebind the traits to a new set of signatures.

receive_cancelled_signature

The signature of a channel cancellation notification.

receive_closed_signature

The signature of a channel closed notification.

Member Functions

Name

Description

invoke_receive_cancelled [static]

Invoke the specified handler with a cancellation notification.

invoke_receive_closed [static]

Invoke the specified handler with a closed notification.

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.

Examples

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();
Requirements

Header: boost/asio/basic_seq_packet_socket.hpp

Convenience header: boost/asio.hpp


PrevUpHomeNext