dns.resolve6(hostname[, options], callback)


  • hostname <string> 需要解析的主机名。
  • options <Object>

    • ttl <boolean> 记录每一条记录的存活次数 (TTL)。如果为 true, 返回的结果将会为 Object 的数组,就像 { address: '0:1:2:3:4:5:6:7', ttl: 60 } 带有 TTL 秒数的记录,而不是 string 的数组.
  • callback <Function>

使用DNS协议解析IPv6地址主机名(AAAA记录)。adresses参数是传递给callback函数的IPv6地址数组.

  • hostname <string> Hostname to resolve.
  • options <Object>

    • ttl <boolean> Retrieve the Time-To-Live value (TTL) of each record. When true, the callback receives an array of { address: '0:1:2:3:4:5:6:7', ttl: 60 } objects rather than an array of strings, with the TTL expressed in seconds.
  • callback <Function>

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.