A Connection.
String address to look up.
Remote port build into the Address.
Whether to include resolved IPv6 addresses or not.
Delegate to call on successful resolution.
Delegate to call on recoverable resolution failure.
Delegate to call on potentially unrecoverable resolution failure. (The return value dictates whether to retry or not.)
Pointer to the global abort flag, which -- if set -- should make the function return.
Connection conn; void onSuccessDg(ResolveAttempt attempt) { writeln("Resolved IPs: ", conn.ips); } void onRetryDg(ResolveAttempt attempt) { writeln("Retrying..."); } bool onFailureDg(ResolveAttempt attempt) { writeln("Failed to resolve!"); return false; } immutable actionAfterResolve = delegateResolve( conn: conn, address: "example.com", port: 80, useIPv6: true, onSuccessDg: &onSuccessDg, onRetryDg: &onRetryDg, onFailureDg: &onFailureDg, abort: abort);
Given an address and a port, resolves these and populates the array of unique Address IPs inside the passed Connection.