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 is an older version of Boost and was released in 2023. The current version is 1.89.0.
The connect function is a
composed operation that establishes a socket connection by trying each endpoint
in a sequence.
Establishes a socket connection by trying each endpoint in a sequence.
template< typename Protocol, typename Executor, typename EndpointSequence> Protocol::endpoint connect( basic_socket< Protocol, Executor > & s, const EndpointSequence & endpoints, typename constraint< is_endpoint_sequence< EndpointSequence >::value >::type = 0); » more... template< typename Protocol, typename Executor, typename EndpointSequence> Protocol::endpoint connect( basic_socket< Protocol, Executor > & s, const EndpointSequence & endpoints, boost::system::error_code & ec, typename constraint< is_endpoint_sequence< EndpointSequence >::value >::type = 0); » more...
(Deprecated: Use range overload.) Establishes a socket connection by trying each endpoint in a sequence.
template< typename Protocol, typename Executor, typename Iterator> Iterator connect( basic_socket< Protocol, Executor > & s, Iterator begin, typename constraint<!is_endpoint_sequence< Iterator >::value >::type = 0); » more... template< typename Protocol, typename Executor, typename Iterator> Iterator connect( basic_socket< Protocol, Executor > & s, Iterator begin, boost::system::error_code & ec, typename constraint<!is_endpoint_sequence< Iterator >::value >::type = 0); » more...
Establishes a socket connection by trying each endpoint in a sequence.
template< typename Protocol, typename Executor, typename Iterator> Iterator connect( basic_socket< Protocol, Executor > & s, Iterator begin, Iterator end); » more... template< typename Protocol, typename Executor, typename Iterator> Iterator connect( basic_socket< Protocol, Executor > & s, Iterator begin, Iterator end, boost::system::error_code & ec); » more... template< typename Protocol, typename Executor, typename EndpointSequence, typename ConnectCondition> Protocol::endpoint connect( basic_socket< Protocol, Executor > & s, const EndpointSequence & endpoints, ConnectCondition connect_condition, typename constraint< is_endpoint_sequence< EndpointSequence >::value >::type = 0); » more... template< typename Protocol, typename Executor, typename EndpointSequence, typename ConnectCondition> Protocol::endpoint connect( basic_socket< Protocol, Executor > & s, const EndpointSequence & endpoints, ConnectCondition connect_condition, boost::system::error_code & ec, typename constraint< is_endpoint_sequence< EndpointSequence >::value >::type = 0); » more...
(Deprecated: Use range overload.) Establishes a socket connection by trying each endpoint in a sequence.
template< typename Protocol, typename Executor, typename Iterator, typename ConnectCondition> Iterator connect( basic_socket< Protocol, Executor > & s, Iterator begin, ConnectCondition connect_condition, typename constraint<!is_endpoint_sequence< Iterator >::value >::type = 0); » more... template< typename Protocol, typename Executor, typename Iterator, typename ConnectCondition> Iterator connect( basic_socket< Protocol, Executor > & s, Iterator begin, ConnectCondition connect_condition, boost::system::error_code & ec, typename constraint<!is_endpoint_sequence< Iterator >::value >::type = 0); » more...
Establishes a socket connection by trying each endpoint in a sequence.
template< typename Protocol, typename Executor, typename Iterator, typename ConnectCondition> Iterator connect( basic_socket< Protocol, Executor > & s, Iterator begin, Iterator end, ConnectCondition connect_condition); » more... template< typename Protocol, typename Executor, typename Iterator, typename ConnectCondition> Iterator connect( basic_socket< Protocol, Executor > & s, Iterator begin, Iterator end, ConnectCondition connect_condition, boost::system::error_code & ec); » more...
Header: boost/asio/connect.hpp
Convenience header: boost/asio.hpp