11 #ifndef ASIO_CONNECT_HPP 12 #define ASIO_CONNECT_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 18 #include "asio/detail/config.hpp" 19 #include "asio/async_result.hpp" 20 #include "asio/basic_socket.hpp" 21 #include "asio/detail/type_traits.hpp" 22 #include "asio/error.hpp" 24 #include "asio/detail/push_options.hpp" 30 char (&has_iterator_helper(...))[2];
33 char has_iterator_helper(T*,
typename T::iterator* = 0);
38 enum { value = (
sizeof((has_iterator_helper)((T*)(0))) == 1) };
47 #if defined(GENERATING_DOCUMENTATION) 48 static const bool value;
90 template <
typename Protocol,
typename Executor,
typename Endpo
intSequence>
92 const EndpointSequence& endpoints,
94 EndpointSequence>::value>::type* = 0);
126 template <
typename Protocol,
typename Executor,
typename Endpo
intSequence>
130 EndpointSequence>::value>::type* = 0);
132 #if !defined(ASIO_NO_DEPRECATED) 157 template <
typename Protocol,
typename Executor,
typename Iterator>
185 template <
typename Protocol,
typename Executor,
typename Iterator>
189 #endif // !defined(ASIO_NO_DEPRECATED) 218 template <
typename Protocol,
typename Executor,
typename Iterator>
220 Iterator begin, Iterator end);
255 template <
typename Protocol,
typename Executor,
typename Iterator>
310 template <
typename Protocol,
typename Executor,
311 typename EndpointSequence,
typename ConnectCondition>
313 const EndpointSequence& endpoints, ConnectCondition connect_condition,
315 EndpointSequence>::value>::type* = 0);
377 template <
typename Protocol,
typename Executor,
378 typename EndpointSequence,
typename ConnectCondition>
380 const EndpointSequence& endpoints, ConnectCondition connect_condition,
383 EndpointSequence>::value>::type* = 0);
385 #if !defined(ASIO_NO_DEPRECATED) 421 template <
typename Protocol,
typename Executor,
422 typename Iterator,
typename ConnectCondition>
424 Iterator begin, ConnectCondition connect_condition,
462 template <
typename Protocol,
typename Executor,
463 typename Iterator,
typename ConnectCondition>
467 #endif // !defined(ASIO_NO_DEPRECATED) 523 template <
typename Protocol,
typename Executor,
524 typename Iterator,
typename ConnectCondition>
526 Iterator end, ConnectCondition connect_condition);
591 template <
typename Protocol,
typename Executor,
592 typename Iterator,
typename ConnectCondition>
594 Iterator begin, Iterator end, ConnectCondition connect_condition,
668 template <
typename Protocol,
typename Executor,
typename EndpointSequence,
670 typename Protocol::endpoint)) RangeConnectHandler
671 ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
675 const EndpointSequence& endpoints,
676 ASIO_MOVE_ARG(RangeConnectHandler) handler
677 ASIO_DEFAULT_COMPLETION_TOKEN(Executor),
679 EndpointSequence>::value>::type* = 0);
681 #if !defined(ASIO_NO_DEPRECATED) 717 template <
typename Protocol,
typename Executor,
typename Iterator,
719 Iterator)) IteratorConnectHandler
720 ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
724 ASIO_MOVE_ARG(IteratorConnectHandler) handler
725 ASIO_DEFAULT_COMPLETION_TOKEN(Executor),
727 #endif // !defined(ASIO_NO_DEPRECATED) 778 template <
typename Protocol,
typename Executor,
typename Iterator,
780 Iterator)) IteratorConnectHandler
781 ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
785 ASIO_MOVE_ARG(IteratorConnectHandler) handler
786 ASIO_DEFAULT_COMPLETION_TOKEN(Executor));
883 template <
typename Protocol,
typename Executor,
884 typename EndpointSequence,
typename ConnectCondition,
886 typename Protocol::endpoint)) RangeConnectHandler
887 ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
891 const EndpointSequence& endpoints, ConnectCondition connect_condition,
892 ASIO_MOVE_ARG(RangeConnectHandler) handler
893 ASIO_DEFAULT_COMPLETION_TOKEN(Executor),
895 EndpointSequence>::value>::type* = 0);
897 #if !defined(ASIO_NO_DEPRECATED) 944 template <
typename Protocol,
typename Executor,
945 typename Iterator,
typename ConnectCondition,
947 Iterator)) IteratorConnectHandler
948 ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
952 ConnectCondition connect_condition,
953 ASIO_MOVE_ARG(IteratorConnectHandler) handler
954 ASIO_DEFAULT_COMPLETION_TOKEN(Executor),
956 #endif // !defined(ASIO_NO_DEPRECATED) 1056 template <
typename Protocol,
typename Executor,
1057 typename Iterator,
typename ConnectCondition,
1059 Iterator)) IteratorConnectHandler
1060 ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(Executor)>
1064 Iterator end, ConnectCondition connect_condition,
1065 ASIO_MOVE_ARG(IteratorConnectHandler) handler
1066 ASIO_DEFAULT_COMPLETION_TOKEN(Executor));
1072 #include "asio/detail/pop_options.hpp" 1074 #include "asio/impl/connect.hpp" Definition: blocking.hpp:208
Definition: connect.hpp:36
Executor const EndpointSequence ConnectCondition enable_if< is_endpoint_sequence< EndpointSequence >::value >::type * ASIO_INITFN_AUTO_RESULT_TYPE(IteratorConnectHandler, void(asio::error_code, Iterator)) async_connect(basic_socket< Protocol
(Deprecated: Use range overload.) Asynchronously establishes a socket connection by trying each endpo...
Type trait used to determine whether a type is an endpoint sequence that can be used with with connec...
Definition: connect.hpp:45
Definition: type_traits.hpp:97
Class to represent an error code value.
Definition: error_code.hpp:80
Iterator connect(basic_socket< Protocol, Executor > &s, Iterator begin, Iterator end, ConnectCondition connect_condition, asio::error_code &ec)
Establishes a socket connection by trying each endpoint in a sequence.
Definition: connect.hpp:229
Provides socket functionality.
Definition: basic_socket.hpp:52
Definition: any_io_executor.hpp:28