DnsResolver

class

Resolve a domain name to a IPv4 address.

The DnsResolver class converts a domain name to an IP Address (A record)

Public Functions

DnsResolver::DnsResolver()

Create an empty dns resolve request

DnsResolver::DnsResolver(String aDomain)

Create a DNS resolve request, and fetch the IP address right away.

Note The request runs asynchonously, make sure to install the completion callback right after construction.

See
setCompletionCallback

mono::String DnsResolver::IpAddress()
const

Get the resolved IP address.

Get the resolved IP address. Note This is first valid after the request is completed.

Return
A text representation of the resolved IP address, or an empty string.
See
IsCompleted

mono::String DnsResolver::DomainName()
const

Gets the Dns request domain name, that is-to-be or has been resolved.

Return
The domain name