AsyncDns

An async domain name service that resolves IP addresses for host names.

The main implementations will typically be implemented using specific DNS libraries such as

  • Android DnsResolver

  • OkHttp DnsOverHttps

  • dnsjava Resolver

Implementations of this interface must be safe for concurrent use.

Types

Link copied to clipboard

Callback to receive results from the DNS Queries.

Link copied to clipboard
Link copied to clipboard

Class of DNS addresses, such that clients that treat these differently, such as attempting IPv6 first, can make such decisions.

Functions

Link copied to clipboard
abstract fun query(hostname: String, callback: AsyncDns.Callback)

Query DNS records for hostname, in the order they are received.