| 966 | BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code)) |
| 967 | ConnectToken = default_completion_token_t<executor_type>> |
| 968 | auto async_connect(const endpoint_type& peer_endpoint, |
| 969 | ConnectToken&& token = default_completion_token_t<executor_type>()) |
| 970 | -> decltype( |
| 971 | async_initiate<ConnectToken, void (boost::system::error_code)>( |
| 972 | declval<initiate_async_connect>(), token, |
| 973 | peer_endpoint, declval<boost::system::error_code&>())) |
| 974 | { |
| 975 | boost::system::error_code open_ec; |
| 976 | if (!is_open()) |
| 977 | { |
| 978 | const protocol_type protocol = peer_endpoint.protocol(); |
| 979 | impl_.get_service().open(impl_.get_implementation(), protocol, open_ec); |
| 980 | } |
| 981 | |
| 982 | return async_initiate<ConnectToken, void (boost::system::error_code)>( |
| 983 | initiate_async_connect(this), token, peer_endpoint, open_ec); |
| 984 | } |
| 985 | |
| 986 | /// Set an option on the socket. |
| 987 | /** |
nothing calls this directly
no test coverage detected