object DNS extends Object with DNS
DNS Singleton
- Annotations
- @native() @JSImport("dns", JSImport.Namespace)
- Alphabetic
- By Inheritance
- DNS
- DNS
- IResolver
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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.
- val BADFAMILY: String
Unsupported address family.
- val BADFLAGS: String
Illegal flags specified.
- val BADHINTS: String
Illegal hints flags specified.
- val BADNAME: String
Misformatted hostname.
- val BADQUERY: String
Misformatted DNS query.
- val BADRESP: String
Misformatted DNS reply.
- val BADSTR: String
Misformatted string.
- val CANCELLED: String
DNS query cancelled.
- val CONNREFUSED: String
Could not contact DNS servers.
- val DESTRUCTION: String
Channel is being destroyed.
- val EOF: String
End of file.
- val FILE: String
Error reading file.
- val FORMERR: String
DNS server claims query was misformatted.
- val LOADIPHLPAPI: String
Error loading iphlpapi.dll.
- val NODATA: String
DNS server returned answer with no data.
- val NOMEM: String
Out of memory.
- val NONAME: String
Given hostname is not numeric.
- val NOTFOUND: String
Domain name not found.
- val NOTIMP: String
DNS server does not implement requested operation.
- val NOTINITIALIZED: String
c-ares library initialization not yet performed.
- val REFUSED: String
DNS server refused query.
- val SERVFAIL: String
DNS server returned general failure.
- val TIMEOUT: String
Timeout while contacting DNS servers.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def getServers(): Array[String]
- Definition Classes
- IResolver
- def hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
- def lookup(hostname: String, callback: DnsCallback1[String]): 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: DnsCallback2[String, Int]): 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: DnsCallback2[String, String]): 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(address, port, callback)
, dns.lookupService('127.0.0.1', 22, (err, hostname, service) => { ... })
Examples: - final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
- def resolve(hostname: String, callback: DnsCallback1[Array[String]]): Unit
- Definition Classes
- IResolver
- def resolve(hostname: String, rrtype: RRType, callback: DnsCallback1[ResolveResult]): Unit
- Definition Classes
- IResolver
- def resolve4(hostname: String, callback: DnsCallback1[Array[String]]): Unit
- Definition Classes
- IResolver
- def resolve4(hostname: String, options: TtlOptions, callback: DnsCallback1[Array[String]]): Unit
- Definition Classes
- IResolver
- def resolve6(hostname: String, options: TtlOptions, callback: DnsCallback1[Array[String]]): Unit
- Definition Classes
- IResolver
- def resolve6(hostname: String, callback: DnsCallback1[Array[String]]): Unit
- Definition Classes
- IResolver
- def resolveAny(hostname: String, callback: DnsCallback1[Array[ResolveObject]]): Unit
- Definition Classes
- IResolver
- def resolveCname(hostname: String, callback: DnsCallback1[Array[String]]): Unit
- Definition Classes
- IResolver
- def resolveMx(hostname: String, callback: DnsCallback1[Array[MX]]): Unit
- Definition Classes
- IResolver
- def resolveNaptr(hostname: String, callback: DnsCallback1[Array[NAPTR]]): Unit
- Definition Classes
- IResolver
- def resolveNs(hostname: String, callback: DnsCallback1[Array[String]]): Unit
- Definition Classes
- IResolver
- def resolvePtr(hostname: String, callback: DnsCallback1[Array[String]]): Unit
- Definition Classes
- IResolver
- def resolveSoa(hostname: String, callback: DnsCallback1[Array[SOA]]): Unit
- Definition Classes
- IResolver
- def resolveSrv(hostname: String, callback: DnsCallback1[Array[SRV]]): Unit
- Definition Classes
- IResolver
- def resolveTxt(hostname: String, callback: DnsCallback1[Array[Array[String]]]): Unit
- Definition Classes
- IResolver
- def reverse(ipAddress: String, callback: DnsCallback1[Array[String]]): Unit
- Definition Classes
- IResolver
- def setServers(servers: Array[String]): Unit
- Definition Classes
- IResolver
- 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(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- object promises extends Object
- Annotations
- @native()