MCPcopy Create free account
hub / github.com/boostorg/beast / on_resolve

Method on_resolve

example/http/client/async-ssl/http_client_async_ssl.cpp:98–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96 }
97
98 void
99 on_resolve(
100 beast::error_code ec,
101 tcp::resolver::results_type results)
102 {
103 if(ec)
104 return fail(ec, "resolve");
105
106 // Set a timeout on the operation
107 beast::get_lowest_layer(stream_).expires_after(std::chrono::seconds(30));
108
109 // Make the connection on the IP address we get from a lookup
110 beast::get_lowest_layer(stream_).async_connect(
111 results,
112 beast::bind_front_handler(
113 &session::on_connect,
114 shared_from_this()));
115 }
116
117 void
118 on_connect(beast::error_code ec, tcp::resolver::results_type::endpoint_type)

Callers

nothing calls this directly

Calls 2

bind_front_handlerFunction · 0.85
failFunction · 0.70

Tested by

no test coverage detected