connect
函数是一个组合操作,它通过尝试序列中的每个端点来建立套接字连接。
通过尝试序列中的每个端点来建立套接字连接。
template< typename Protocol, typename Executor, typename EndpointSequence> Protocol::endpoint connect( basic_socket< Protocol, Executor > & s, const EndpointSequence & endpoints, constraint_t< is_endpoint_sequence< EndpointSequence >::value > = 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, constraint_t< is_endpoint_sequence< EndpointSequence >::value > = 0); » more... 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, 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 EndpointSequence, typename ConnectCondition> Protocol::endpoint connect( basic_socket< Protocol, Executor > & s, const EndpointSequence & endpoints, ConnectCondition connect_condition, boost::system::error_code & ec, 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> Iterator connect( basic_socket< Protocol, Executor > & s, Iterator begin, Iterator end, ConnectCondition connect_condition, constraint_t< is_connect_condition< ConnectCondition, Iterator >::value > = 0); » 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, constraint_t< is_connect_condition< ConnectCondition, Iterator >::value > = 0); » more...
头文件: boost/asio/impl/connect.hpp
便捷头文件: boost/asio.hpp