DnsHostNameResolver

Reverse DNS lookup, bounded by an explicit timeout because a missing PTR record makes the resolver wait out its own retries. Only the first label is kept - a machine name is not an FQDN.

public sealed class DnsHostNameResolver : IHostNameResolver

1. Methods

1.1. ResolveAsync(IP, TimeSpan, CancellationToken)

Resolve the name for address, or null when nothing answers. Never throws for an unresolvable address.

public Task<MachineName?> ResolveAsync(IP address, TimeSpan timeout, CancellationToken cancellationToken)
Table 1. Parameters
Name Type Description

address

IP

Address to reverse-resolve.

timeout

TimeSpan

How long to wait before giving up.

cancellationToken

CancellationToken

Cancels the lookup.

Returns: Task<MachineName?>