object DNS extends Object with DNS
DNS Singleton
- Annotations
- @native() @JSImport( "dns" , JSImport.Namespace )
- Alphabetic
- By Inheritance
- DNS
- DNS
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
val
ADDRGETNETWORKPARAMS: String
Could not find GetNetworkParams function.
Could not find GetNetworkParams function.
- Definition Classes
- DNS
-
val
BADFAMILY: String
Unsupported address family.
Unsupported address family.
- Definition Classes
- DNS
-
val
BADFLAGS: String
Illegal flags specified.
Illegal flags specified.
- Definition Classes
- DNS
-
val
BADHINTS: String
Illegal hints flags specified.
Illegal hints flags specified.
- Definition Classes
- DNS
-
val
BADNAME: String
Misformatted hostname.
Misformatted hostname.
- Definition Classes
- DNS
-
val
BADQUERY: String
Misformatted DNS query.
Misformatted DNS query.
- Definition Classes
- DNS
-
val
BADRESP: String
Misformatted DNS reply.
Misformatted DNS reply.
- Definition Classes
- DNS
-
val
BADSTR: String
Misformatted string.
Misformatted string.
- Definition Classes
- DNS
-
val
CANCELLED: String
DNS query cancelled.
DNS query cancelled.
- Definition Classes
- DNS
-
val
CONNREFUSED: String
Could not contact DNS servers.
Could not contact DNS servers.
- Definition Classes
- DNS
-
val
DESTRUCTION: String
Channel is being destroyed.
Channel is being destroyed.
- Definition Classes
- DNS
-
val
EOF: String
End of file.
End of file.
- Definition Classes
- DNS
-
val
FILE: String
Error reading file.
Error reading file.
- Definition Classes
- DNS
-
val
FORMERR: String
DNS server claims query was misformatted.
DNS server claims query was misformatted.
- Definition Classes
- DNS
-
val
LOADIPHLPAPI: String
Error loading iphlpapi.dll.
Error loading iphlpapi.dll.
- Definition Classes
- DNS
-
val
NODATA: String
DNS server returned answer with no data.
DNS server returned answer with no data.
- Definition Classes
- DNS
-
val
NOMEM: String
Out of memory.
Out of memory.
- Definition Classes
- DNS
-
val
NONAME: String
Given hostname is not numeric.
Given hostname is not numeric.
- Definition Classes
- DNS
-
val
NOTFOUND: String
Domain name not found.
Domain name not found.
- Definition Classes
- DNS
-
val
NOTIMP: String
DNS server does not implement requested operation.
DNS server does not implement requested operation.
- Definition Classes
- DNS
-
val
NOTINITIALIZED: String
c-ares library initialization not yet performed.
c-ares library initialization not yet performed.
- Definition Classes
- DNS
-
val
REFUSED: String
DNS server refused query.
DNS server refused query.
- Definition Classes
- DNS
-
val
SERVFAIL: String
DNS server returned general failure.
DNS server returned general failure.
- Definition Classes
- DNS
-
val
TIMEOUT: String
Timeout while contacting DNS servers.
Timeout while contacting DNS servers.
- Definition Classes
- DNS
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
getServers(): Array[String]
Returns an array of IP address strings that are being used for name resolution.
Returns an array of IP address strings that are being used for name resolution.
- Definition Classes
- DNS
-
def
hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
-
def
lookup(hostname: String, callback: Function): Unit
Resolves a hostname (e.g.
Resolves a hostname (e.g. 'nodejs.org') into the first found A (IPv4) or AAAA (IPv6) record. options can be an object or integer. If options is not provided, then IPv4 and IPv6 addresses are both valid. If options is an integer, then it must be 4 or 6.
Alternatively, options can be an object containing these properties:
- family <Number> - The record family. If present, must be the integer 4 or 6. If not provided, both IP v4 and v6 addresses are accepted.
- hints: <Number> - If present, it should be one or more of the supported getaddrinfo flags. If hints is not provided, then no flags are passed to getaddrinfo. Multiple flags can be passed through hints by logically ORing their values. See supported getaddrinfo flags for more information on supported flags.
- all: <Boolean> - When true, the callback returns all resolved addresses in an array, otherwise returns a single address. Defaults to false.
All properties are optional.
- Definition Classes
- DNS
dns.lookup(hostname[, options], callback)
Example: -
def
lookup(hostname: String, options: |[DnsOptions, Int], callback: Function): Unit
Resolves a hostname (e.g.
Resolves a hostname (e.g. 'nodejs.org') into the first found A (IPv4) or AAAA (IPv6) record. options can be an object or integer. If options is not provided, then IPv4 and IPv6 addresses are both valid. If options is an integer, then it must be 4 or 6.
Alternatively, options can be an object containing these properties:
- family <Number> - The record family. If present, must be the integer 4 or 6. If not provided, both IP v4 and v6 addresses are accepted.
- hints: <Number> - If present, it should be one or more of the supported getaddrinfo flags. If hints is not provided, then no flags are passed to getaddrinfo. Multiple flags can be passed through hints by logically ORing their values. See supported getaddrinfo flags for more information on supported flags.
- all: <Boolean> - When true, the callback returns all resolved addresses in an array, otherwise returns a single address. Defaults to false.
All properties are optional.
- Definition Classes
- DNS
dns.lookup(hostname[, options], callback)
Example: -
def
lookupService(address: String, port: Int, callback: Function): Unit
Resolves the given address and port into a hostname and service using the operating system's underlying getnameinfo implementation.
Resolves the given address and port into a hostname and service using the operating system's underlying getnameinfo implementation.
If address is not a valid IP address, a TypeError will be thrown. The port will be coerced to a number. If it is not a legal port, a TypeError will be thrown.
The callback has arguments (err, hostname, service). The hostname and service arguments are strings (e.g. 'localhost' and 'http' respectively).
On error, err is an Error object, where err.code is the error code.
- Definition Classes
- DNS
dns.lookupService('127.0.0.1', 22, (err, hostname, service) => { ... })
, dns.lookupService(address, port, callback)
Examples: -
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
-
def
resolve(hostname: String, callback: Function): Unit
Uses the DNS protocol to resolve a hostname (e.g.
Uses the DNS protocol to resolve a hostname (e.g. 'nodejs.org') into an array of the record types specified by rrtype. On error, err is an Error object, where err.code is one of the error codes listed here.
- hostname
the hostname
- callback
the callback function has arguments (err, addresses). When successful, addresses will be an array. The type of each item in addresses is determined by the record type, and described in the documentation for the corresponding lookup methods.
- Definition Classes
- DNS
dns.resolve(hostname[, rrtype], callback)
Example: -
def
resolve(hostname: String, rrtype: RRType, callback: Function): Unit
Uses the DNS protocol to resolve a hostname (e.g.
Uses the DNS protocol to resolve a hostname (e.g. 'nodejs.org') into an array of the record types specified by rrtype. On error, err is an Error object, where err.code is one of the error codes listed here.
- hostname
the hostname
- rrtype
the given rrtype Valid values for rrtype are: 'A' - IPV4 addresses, default 'AAAA' - IPV6 addresses 'MX' - mail exchange records 'TXT' - text records 'SRV' - SRV records 'PTR' - PTR records 'NS' - name server records 'CNAME' - canonical name records 'SOA' - start of authority record 'NAPTR' - name authority pointer record
- callback
the callback function has arguments (err, addresses). When successful, addresses will be an array. The type of each item in addresses is determined by the record type, and described in the documentation for the corresponding lookup methods.
- Definition Classes
- DNS
dns.resolve(hostname[, rrtype], callback)
Example: -
def
resolve4(hostname: String, callback: Function): Unit
Uses the DNS protocol to resolve a IPv4 addresses (A records) for the hostname.
Uses the DNS protocol to resolve a IPv4 addresses (A records) for the hostname. The addresses argument passed to the callback function will contain an array of IPv4 addresses (e.g. ['74.125.79.104', '74.125.79.105', '74.125.79.106']).
- Definition Classes
- DNS
dns.resolve4(hostname, callback)
Example: -
def
resolve6(hostname: String, callback: Function): Unit
Uses the DNS protocol to resolve a IPv6 addresses (AAAA records) for the hostname.
Uses the DNS protocol to resolve a IPv6 addresses (AAAA records) for the hostname. The addresses argument passed to the callback function will contain an array of IPv6 addresses.
- Definition Classes
- DNS
dns.resolve6(hostname, callback)
Example: -
def
resolveCname(hostname: String, callback: Function): Unit
Uses the DNS protocol to resolve CNAME records for the hostname.
Uses the DNS protocol to resolve CNAME records for the hostname. The addresses argument passed to the callback function will contain an array of canonical name records available for the hostname (e.g. ['bar.example.com']).
- Definition Classes
- DNS
dns.resolveCname(hostname, callback)
Example: -
def
resolveMx(hostname: String, callback: Function): Unit
Uses the DNS protocol to resolve mail exchange records (MX records) for the hostname.
Uses the DNS protocol to resolve mail exchange records (MX records) for the hostname. The addresses argument passed to the callback function will contain an array of objects containing both a priority and exchange property (e.g. [{priority: 10, exchange: 'mx.example.com'}, ...]).
- Definition Classes
- DNS
dns.resolveMx(hostname, callback)
Example: -
def
resolveNaptr(hostname: String, callback: Function): Unit
Uses the DNS protocol to resolve regular expression based records (NAPTR records) for the hostname.
Uses the DNS protocol to resolve regular expression based records (NAPTR records) for the hostname. The callback function has arguments (err, addresses). The addresses argument passed to the callback function will contain an array of objects with the following properties:
- flags
- service
- regexp
- replacement
- order
- preference
- Definition Classes
- DNS
dns.resolveNaptr(hostname, callback)
Example: -
def
resolveNs(hostname: String, callback: Function): Unit
Uses the DNS protocol to resolve name server records (NS records) for the hostname.
Uses the DNS protocol to resolve name server records (NS records) for the hostname. The addresses argument passed to the callback function will contain an array of name server records available for hostname (e.g., ['ns1.example.com', 'ns2.example.com']).
- Definition Classes
- DNS
dns.resolveNs(hostname, callback)
Example: -
def
resolvePtr(hostname: String, callback: Function): Unit
Uses the DNS protocol to resolve pointer records (PTR records) for the hostname.
Uses the DNS protocol to resolve pointer records (PTR records) for the hostname. The addresses argument passed to the callback function will be an array of strings containing the reply records.
- Definition Classes
- DNS
dns.resolvePtr(hostname, callback)
Example: -
def
resolveSoa(hostname: String, callback: Function): Unit
Uses the DNS protocol to resolve a start of authority record (SOA record) for the hostname.
Uses the DNS protocol to resolve a start of authority record (SOA record) for the hostname. The addresses argument passed to the callback function will be an object with the following properties:
- nsname
- hostmaster
- serial
- refresh
- retry
- expire
- minttl
- Definition Classes
- DNS
dns.resolveSoa(hostname, callback)
Example: -
def
resolveSrv(hostname: String, callback: Function): Unit
Uses the DNS protocol to resolve service records (SRV records) for the hostname.
Uses the DNS protocol to resolve service records (SRV records) for the hostname. The addresses argument passed to the callback function will be an array of objects with the following properties:
- priority
- weight
- port
- name
- Definition Classes
- DNS
dns.resolveSrv(hostname, callback)
Example: -
def
resolveTxt(hostname: String, callback: Function): Unit
Uses the DNS protocol to resolve text queries (TXT records) for the hostname.
Uses the DNS protocol to resolve text queries (TXT records) for the hostname. The addresses argument passed to the callback function is is a two-dimentional array of the text records available for hostname (e.g., [ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]). Each sub-array contains TXT chunks of one record. Depending on the use case, these could be either joined together or treated separately.
- Definition Classes
- DNS
dns.resolveTxt(hostname, callback)
Example: -
def
reverse(ipAddress: String, callback: Function): Unit
Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an array of hostnames.
Performs a reverse DNS query that resolves an IPv4 or IPv6 address to an array of hostnames. The callback function has arguments (err, hostnames), where hostnames is an array of resolved hostnames for the given ip. On error, err is an Error object, where err.code is one of the DNS error codes.
- Definition Classes
- DNS
dns.reverse(ip, callback)
Example: -
def
setServers(servers: Array[String]): Unit
Sets the IP addresses of the servers to be used when resolving.
Sets the IP addresses of the servers to be used when resolving. The servers argument is an array of IPv4 or IPv6 addresses. If a port specified on the address it will be removed. An error will be thrown if an invalid address is provided. The dns.setServers() method must not be called while a DNS query is in progress.
- Definition Classes
- DNS
dns.setServers(servers)
Example: -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toLocaleString(): String
- Definition Classes
- Object
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
valueOf(): Any
- Definition Classes
- Object
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )