Object/Trait

io.scalajs.nodejs.dns

DNS

Related Docs: trait DNS | package dns

Permalink

object DNS extends Object with DNS

DNS Singleton

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

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val ADDRGETNETWORKPARAMS: String

    Permalink

    Could not find GetNetworkParams function.

  5. val BADFAMILY: String

    Permalink

    Unsupported address family.

  6. val BADFLAGS: String

    Permalink

    Illegal flags specified.

  7. val BADHINTS: String

    Permalink

    Illegal hints flags specified.

  8. val BADNAME: String

    Permalink

    Misformatted hostname.

  9. val BADQUERY: String

    Permalink

    Misformatted DNS query.

  10. val BADRESP: String

    Permalink

    Misformatted DNS reply.

  11. val BADSTR: String

    Permalink

    Misformatted string.

  12. val CANCELLED: String

    Permalink

    DNS query cancelled.

  13. val CONNREFUSED: String

    Permalink

    Could not contact DNS servers.

  14. val DESTRUCTION: String

    Permalink

    Channel is being destroyed.

  15. val EOF: String

    Permalink

    End of file.

  16. val FILE: String

    Permalink

    Error reading file.

  17. val FORMERR: String

    Permalink

    DNS server claims query was misformatted.

  18. val LOADIPHLPAPI: String

    Permalink

    Error loading iphlpapi.dll.

  19. val NODATA: String

    Permalink

    DNS server returned answer with no data.

  20. val NOMEM: String

    Permalink

    Out of memory.

  21. val NONAME: String

    Permalink

    Given hostname is not numeric.

  22. val NOTFOUND: String

    Permalink

    Domain name not found.

  23. val NOTIMP: String

    Permalink

    DNS server does not implement requested operation.

  24. val NOTINITIALIZED: String

    Permalink

    c-ares library initialization not yet performed.

  25. val REFUSED: String

    Permalink

    DNS server refused query.

  26. val SERVFAIL: String

    Permalink

    DNS server returned general failure.

  27. val TIMEOUT: String

    Permalink

    Timeout while contacting DNS servers.

  28. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  29. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  31. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  32. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  33. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  34. def getServers(): Array[String]

    Permalink

    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
  35. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  36. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  37. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  38. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  39. def lookup(hostname: String, callback: DnsCallback1[String]): Unit

    Permalink

    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 lookup(hostname: String, options: |[|[DnsOptions, RawOptions], Int], callback: DnsCallback1[String]): Unit

    Permalink

    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)

  41. def lookupService(address: String, port: Int, callback: DnsCallback2[String, String]): Unit

    Permalink

    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('127.0.0.1', 22, (err, hostname, service) => { ... })

    2. ,
    3. dns.lookupService(address, port, callback)

  42. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  43. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  44. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  45. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  46. def resolve(hostname: String, callback: DnsCallback1[Array[String]]): Unit

    Permalink

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

  47. def resolve[A](hostname: String, rrtype: RRType, callback: DnsCallback1[A]): Unit

    Permalink

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

  48. def resolve4(hostname: String, callback: DnsCallback1[Array[String]]): Unit

    Permalink

    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
    Example:
    1. dns.resolve4(hostname, callback)

  49. def resolve6(hostname: String, callback: DnsCallback1[Array[String]]): Unit

    Permalink

    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
    Example:
    1. dns.resolve6(hostname, callback)

  50. def resolveCname(hostname: String, callback: DnsCallback1[Array[String]]): Unit

    Permalink

    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
    Example:
    1. dns.resolveCname(hostname, callback)

  51. def resolveMx(hostname: String, callback: DnsCallback1[MX]): Unit

    Permalink

    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
    Example:
    1. dns.resolveMx(hostname, callback)

  52. def resolveNaptr(hostname: String, callback: DnsCallback1[NAPTR]): Unit

    Permalink

    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
    Example:
    1. dns.resolveNaptr(hostname, callback)

  53. def resolveNs(hostname: String, callback: DnsCallback1[Array[String]]): Unit

    Permalink

    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
    Example:
    1. dns.resolveNs(hostname, callback)

  54. def resolvePtr(hostname: String, callback: DnsCallback1[Array[String]]): Unit

    Permalink

    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
    Example:
    1. dns.resolvePtr(hostname, callback)

  55. def resolveSoa(hostname: String, callback: DnsCallback1[SOA]): Unit

    Permalink

    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
    Example:
    1. dns.resolveSoa(hostname, callback)

  56. def resolveSrv(hostname: String, callback: DnsCallback1[SRV]): Unit

    Permalink

    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
    Example:
    1. dns.resolveSrv(hostname, callback)

  57. def resolveTxt(hostname: String, callback: DnsCallback1[Array[Array[String]]]): Unit

    Permalink

    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
    Example:
    1. dns.resolveTxt(hostname, callback)

  58. def reverse(ipAddress: String, callback: DnsCallback1[Array[String]]): Unit

    Permalink

    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
    Example:
    1. dns.reverse(ip, callback)

  59. def setServers(servers: Array[String]): Unit

    Permalink

    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
    Example:
    1. dns.setServers(servers)

  60. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  61. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  62. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  63. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  64. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  65. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  66. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from DNS

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped