2
0
mirror of https://github.com/boostorg/cobalt.git synced 2026-01-24 05:42:13 +00:00
Files
cobalt/doc/reference/io/resolver.adoc
Klemens Morgenstern 620b63c4b4 [io] Added resolver.
2025-06-24 18:15:10 +08:00

26 lines
557 B
Plaintext

== cobalt/io/resolver.hpp
The resolver allows looking up the endpoints for a given address and service.
[source,cpp]
----
struct resolver
{
resolver(const executor & exec = this_thread::get_executor());
resolver(resolver && ) = delete;
void cancel();
// Produces a endpoint_sequence
[[nodiscard]] auto resolve(std::string_view host, std::string_view service);
};
// Short hand for performing a single lookup.
auto lookup(std::string_view host, std::string_view service,
const executor & exec = this_thread::get_executor());
----