eve.aio.dns

Asynchronous DNS resolution.

This module provides high-level asynchronous DNS resolution built on top of the EVE event loop and a thread pool. It follows the EVE principles of zero-allocation and non-blocking I/O by offloading blocking libc calls to worker threads.

Types 1

Resolver for translating hostnames to IP addresses.

Fields
EventLoop * _loop
Methods
DnsResolver create(ref EventLoop loop, ThreadPool pool = null) @trustedCreate a new DNS resolver associated with an event loop.
bool resolve(scope const(char)[] hostname, EventLoop.DnsWatcherCallback callback, CancelToken cancel = CancelToken .invalid) @trustedAsynchronously resolve a hostname.
void performResolution(Token token) @trusted
DnsError mapDnsError(int err) pure @safe nothrow @nogc