Seastar
High performance C++ framework for concurrent servers
|
A DNS resolver object. Wraps the query logic & networking. Can be instantiated with options and your network stack of choice, though for "normal" non-test querying, you are probably better of with the global calls further down.
#include <seastar/net/dns.hh>
Classes | |
struct | options |
Public Types | |
enum class | srv_proto { tcp , udp } |
using | srv_records = std::vector< srv_record > |
Public Member Functions | |
dns_resolver (dns_resolver &&) noexcept | |
dns_resolver (const options &) | |
dns_resolver (network_stack &, const options &={}) | |
dns_resolver & | operator= (dns_resolver &&) noexcept |
future< hostent > | get_host_by_name (const sstring &, opt_family={}) |
future< hostent > | get_host_by_addr (const inet_address &) |
future< inet_address > | resolve_name (const sstring &, opt_family={}) |
future< sstring > | resolve_addr (const inet_address &) |
future< srv_records > | get_srv_records (srv_proto proto, const sstring &service, const sstring &domain) |
future | close () |
struct seastar::net::dns_resolver::options |
Class Members | ||
---|---|---|
optional< vector< sstring > > | domains | |
optional< vector< inet_address > > | servers | |
optional< uint16_t > | tcp_port | |
optional< milliseconds > | timeout | |
optional< uint16_t > | udp_port | |
optional< bool > | use_tcp_query |
future seastar::net::dns_resolver::close | ( | ) |
Shuts the object down. Great for tests.
future< hostent > seastar::net::dns_resolver::get_host_by_addr | ( | const inet_address & | ) |
Resolves an address to one or more addresses and aliases
future< hostent > seastar::net::dns_resolver::get_host_by_name | ( | const sstring & | , |
opt_family | = {} |
||
) |
Resolves a hostname to one or more addresses and aliases
future< srv_records > seastar::net::dns_resolver::get_srv_records | ( | srv_proto | proto, |
const sstring & | service, | ||
const sstring & | domain | ||
) |
Resolve a service in given domain to one or more SRV records
future< sstring > seastar::net::dns_resolver::resolve_addr | ( | const inet_address & | ) |
Resolves an address to one (primary) name
future< inet_address > seastar::net::dns_resolver::resolve_name | ( | const sstring & | , |
opt_family | = {} |
||
) |
Resolves a hostname to one (primary) address