explicit basic_socket_acceptor(io_context& ctx);
basic_socket_acceptor(io_context& ctx, const protocol_type& protocol);
Effects: Opens this acceptor as if by calling open(protocol).
basic_socket_acceptor(io_context& ctx, const endpoint_type& endpoint,
bool reuse_addr = true);
Effects: Opens and binds this acceptor as if by calling:
open(endpoint.protocol()); if (reuse_addr) set_option(reuse_address(true)); bind(endpoint); listen();
basic_socket_acceptor(io_context& ctx, const protocol_type& protocol,
const native_handle_type& native_acceptor);
Requires: native_acceptor is a native handle to an open acceptor.
Effects: Assigns the existing native acceptor into this acceptor as if by calling assign(protocol, native_acceptor).
basic_socket_acceptor(basic_socket_acceptor&& rhs);
Effects: Move constructs an object of class basic_socket_acceptor<AcceptableProtocol> that refers to the state originally represented by rhs.
Postconditions:
get_executor() == rhs.get_executor().
is_open() returns the same value as rhs.is_open() prior to the constructor invocation.
non_blocking() returns the same value as rhs.non_blocking() prior to the constructor invocation.
enable_connection_aborted() returns the same value as rhs.enable_connection_aborted() prior to the constructor invocation.
native_handle() returns the same value as rhs.native_handle() prior to the constructor invocation.
protocol_ is equal to the prior value of rhs.protocol_.
rhs.is_open() == false.
template<class OtherProtocol>
basic_socket_acceptor(basic_socket_acceptor<OtherProtocol>&& rhs);
Requires: OtherProtocol is implicitly convertible to Protocol.
Effects: Move constructs an object of class basic_socket_acceptor<AcceptableProtocol> that refers to the state originally represented by rhs.
Postconditions:
get_executor() == rhs.get_executor().
is_open() returns the same value as rhs.is_open() prior to the constructor invocation.
non_blocking() returns the same value as rhs.non_blocking() prior to the constructor invocation.
enable_connection_aborted() returns the same value as rhs.enable_connection_aborted() prior to the constructor invocation.
native_handle() returns the prior value of rhs.native_handle().
protocol_ is the result of converting the prior value of rhs.protocol_.
rhs.is_open() == false.
Remarks: This constructor shall not participate in overload resolution unless OtherProtocol is implicitly convertible to Protocol.