Library: dns
Overview
Library for DNS operations such as looking up IP addresses and hostnames.
These are similar to the PHP functions gethostbyname() and gethostbyaddr().
source: dns.js
Functions
Converts a hostname string (such as "appjet.com") to an IP address,
returned as a string (such as "74.86.117.106"). This function is the inverse
of gethostbyaddr().
parameters
| string | hostname | The DNS name to resolve (example: "www.appjet.com"). |
returns
| string | the IP address corresponding to the given hostname, or undefined. |
Converts an IP address string (such as "74.86.117.106") to a hostname
(such as "appjet.com"). This function is the inverse of gethostbyname().
parameters
| string | ipaddr | The IP address to resolve (example: "74.86.117.106"). |
returns
| string | the hostname corresponding to the given ip address, or undefined. |