1234567module juptune.dns.resolver;
Result dnsLookupIp(
const char[] domainName,
IpAddress ip,
IpAddress.Kind ipKind = Kind.ipv4
);
Easy to use public API
Performs a DNS for the given domain name, either for IPv4 or IPv6 depending on the ipKindparameter.
This function will ask every nameserver it knows of in order until one produces a response. Regardless of whether this response was a success or a failure, it'll stop once it receives said response.
This function supports "/etc/resolve.conf", but only understands "nameserver" directives.
DnsResolverError.noNameserversif no nameservers could be loaded.
DnsResolverError.notFoundif a nameserver was unable to find any suitable records for the domain.
DnsResolverError.badResponseif a nameserver produced any other kind of error response that's not explicitly handled.
Anything that dnsQueryRfc1035and dnsDecodePayloadcan throw.
A Result.