Skip to content

Domain Name Resolver Class Pattern

The Domain Name Resolver Class Pattern defines an interface for resolving hostnames to IP addresses.

Resolves a hostname to an IP address.

resolve({ host }, callback)

options

host - A string containing the hostname to resolve.

callback

callback(error, name, address)

error - An Error object if the operation failed, or null if successful.

name - The hostname that was resolved.

address - The resolved IP address as a string.

Domain Name Resolver Class Pattern