Domain Name Resolver Class Pattern
The Domain Name Resolver Class Pattern defines an interface for resolving hostnames to IP addresses.
Instance Methods
Section titled “Instance Methods”resolve(options[, callback])
Section titled “resolve(options[, callback])”Resolves a hostname to an IP address.
resolve({ host }, callback)Parameters
Section titled “Parameters”options
host- A string containing the hostname to resolve.
callback
callback(error, name, address)
error- AnErrorobject if the operation failed, ornullif successful.
name- The hostname that was resolved.
address- The resolved IP address as a string.