Class DNS
The DNS class is used to perform hostname and IP address resolution.
Experimental
Defined in: utils.js.
Constructor Attributes | Constructor Name and Description |
---|---|
DNS(server)
Creates a DNS resolver class object.
|
Method Attributes | Method Name and Description |
---|---|
<static> |
DNS.resolve(host)
Resolve a hostname or IP address.
|
Class Detail
DNS(server)
Creates a DNS resolver class object.
- Parameters:
- {String} server
- The IP address or name of the server to use for lookups.
Method Detail
<static>
{String}
DNS.resolve(host)
Resolve a hostname or IP address.
This method will autodetect which format is passed in (host or IP) and return the other.
Experimental
- Parameters:
- {String} host
- Returns:
- {String} IP address or hostname that the passed in hostname or IP resolved to.