MCPcopy Create free account
hub / github.com/boostorg/asio / async_connect

Function async_connect

include/boost/asio/basic_socket.hpp:968–984  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 /**

Callers

nothing calls this directly

Calls 4

is_openFunction · 0.70
protocolMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected