...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
The async_connect
function
is a composed asynchronous operation that establishes a socket connection
by trying each endpoint in a sequence.
Asynchronously establishes a socket connection by trying each endpoint in a sequence.
template< typename Protocol, typename Executor, typename EndpointSequence, typename RangeConnectToken = default_completion_token_t<Executor>> DEDUCED async_connect( basic_socket< Protocol, Executor > & s, const EndpointSequence & endpoints, RangeConnectToken && token = default_completion_token_t< Executor >(), constraint_t< is_endpoint_sequence< EndpointSequence >::value > = 0, constraint_t< !is_connect_condition< RangeConnectToken, decltype(declval< const EndpointSequence & >().begin())>::value >= 0); » more... template< typename Protocol, typename Executor, typename Iterator, typename IteratorConnectToken = default_completion_token_t<Executor>> DEDUCED async_connect( basic_socket< Protocol, Executor > & s, Iterator begin, Iterator end, IteratorConnectToken && token = default_completion_token_t< Executor >(), constraint_t< !is_connect_condition< IteratorConnectToken, Iterator >::value > = 0); » more... template< typename Protocol, typename Executor, typename EndpointSequence, typename ConnectCondition, typename RangeConnectToken = default_completion_token_t<Executor>> DEDUCED async_connect( basic_socket< Protocol, Executor > & s, const EndpointSequence & endpoints, ConnectCondition connect_condition, RangeConnectToken && token = default_completion_token_t< Executor >(), constraint_t< is_endpoint_sequence< EndpointSequence >::value > = 0, constraint_t< is_connect_condition< ConnectCondition, decltype(declval< const EndpointSequence & >().begin())>::value >= 0); » more... template< typename Protocol, typename Executor, typename Iterator, typename ConnectCondition, typename IteratorConnectToken = default_completion_token_t<Executor>> DEDUCED async_connect( basic_socket< Protocol, Executor > & s, Iterator begin, Iterator end, ConnectCondition connect_condition, IteratorConnectToken && token = default_completion_token_t< Executor >(), constraint_t< is_connect_condition< ConnectCondition, Iterator >::value > = 0); » more...
Header: boost/asio/connect.hpp
Convenience header: boost/asio.hpp