Packages

object DNS extends Object with DNS

DNS Singleton

Annotations
@native() @JSImport("dns", JSImport.Namespace)
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. DNS
  2. DNS
  3. IResolver
  4. Object
  5. Any
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val ADDRGETNETWORKPARAMS: String

    Could not find GetNetworkParams function.

  5. val BADFAMILY: String

    Unsupported address family.

  6. val BADFLAGS: String

    Illegal flags specified.

  7. val BADHINTS: String

    Illegal hints flags specified.

  8. val BADNAME: String

    Misformatted hostname.

  9. val BADQUERY: String

    Misformatted DNS query.

  10. val BADRESP: String

    Misformatted DNS reply.

  11. val BADSTR: String

    Misformatted string.

  12. val CANCELLED: String

    DNS query cancelled.

  13. val CONNREFUSED: String

    Could not contact DNS servers.

  14. val DESTRUCTION: String

    Channel is being destroyed.

  15. val EOF: String

    End of file.

  16. val FILE: String

    Error reading file.

  17. val FORMERR: String

    DNS server claims query was misformatted.

  18. val LOADIPHLPAPI: String

    Error loading iphlpapi.dll.

  19. val NODATA: String

    DNS server returned answer with no data.

  20. val NOMEM: String

    Out of memory.

  21. val NONAME: String

    Given hostname is not numeric.

  22. val NOTFOUND: String

    Domain name not found.

  23. val NOTIMP: String

    DNS server does not implement requested operation.

  24. val NOTINITIALIZED: String

    c-ares library initialization not yet performed.

  25. val REFUSED: String

    DNS server refused query.

  26. val SERVFAIL: String

    DNS server returned general failure.

  27. val TIMEOUT: String

    Timeout while contacting DNS servers.

  28. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  29. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  30. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  31. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  32. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  33. def getServers(): Array[String]
    Definition Classes
    IResolver
  34. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  35. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  36. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  37. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  38. 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
    Example:
    1. dns.lookup(hostname[, options], callback)

  39. 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
    Example:
    1. dns.lookup(hostname[, options], callback)

  40. 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
    Examples:
    1. dns.lookupService(address, port, callback)

    2. ,
    3. dns.lookupService('127.0.0.1', 22, (err, hostname, service) => { ... })

  41. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  42. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  43. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  44. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  45. def resolve(hostname: String, callback: DnsCallback1[Array[String]]): Unit
    Definition Classes
    IResolver
  46. def resolve(hostname: String, rrtype: RRType, callback: DnsCallback1[ResolveResult]): Unit
    Definition Classes
    IResolver
  47. def resolve4(hostname: String, callback: DnsCallback1[Array[String]]): Unit
    Definition Classes
    IResolver
  48. def resolve4(hostname: String, options: TtlOptions, callback: DnsCallback1[Array[String]]): Unit
    Definition Classes
    IResolver
  49. def resolve6(hostname: String, options: TtlOptions, callback: DnsCallback1[Array[String]]): Unit
    Definition Classes
    IResolver
  50. def resolve6(hostname: String, callback: DnsCallback1[Array[String]]): Unit
    Definition Classes
    IResolver
  51. def resolveAny(hostname: String, callback: DnsCallback1[Array[ResolveObject]]): Unit
    Definition Classes
    IResolver
  52. def resolveCname(hostname: String, callback: DnsCallback1[Array[String]]): Unit
    Definition Classes
    IResolver
  53. def resolveMx(hostname: String, callback: DnsCallback1[Array[MX]]): Unit
    Definition Classes
    IResolver
  54. def resolveNaptr(hostname: String, callback: DnsCallback1[Array[NAPTR]]): Unit
    Definition Classes
    IResolver
  55. def resolveNs(hostname: String, callback: DnsCallback1[Array[String]]): Unit
    Definition Classes
    IResolver
  56. def resolvePtr(hostname: String, callback: DnsCallback1[Array[String]]): Unit
    Definition Classes
    IResolver
  57. def resolveSoa(hostname: String, callback: DnsCallback1[Array[SOA]]): Unit
    Definition Classes
    IResolver
  58. def resolveSrv(hostname: String, callback: DnsCallback1[Array[SRV]]): Unit
    Definition Classes
    IResolver
  59. def resolveTxt(hostname: String, callback: DnsCallback1[Array[Array[String]]]): Unit
    Definition Classes
    IResolver
  60. def reverse(ipAddress: String, callback: DnsCallback1[Array[String]]): Unit
    Definition Classes
    IResolver
  61. def setServers(servers: Array[String]): Unit
    Definition Classes
    IResolver
  62. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  63. def toLocaleString(): String
    Definition Classes
    Object
  64. def toString(): String
    Definition Classes
    AnyRef → Any
  65. def valueOf(): Any
    Definition Classes
    Object
  66. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  67. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  68. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  69. object promises extends Object
    Annotations
    @native()

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from DNS

Inherited from IResolver

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped