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


版本历史
版本变更
v18.0.0

将无效回调传给 callback 参数现在会抛出 ERR_INVALID_ARG_TYPE 而不是 ERR_INVALID_CALLBACK

v7.2.0

此方法现在支持传入 options,特别是 options.ttl

v0.1.16

新增于: v0.1.16

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

    \hostname <string> Host name to resolve.

  • options <Object>

    • ttl <boolean> 检索每条记录的生存时间值 (TTL)。当为 true 时,回调接收 { address: '0:1:2:3:4:5:6:7', ttl: 60 } 对象数组而不是字符串数组,TTL 以秒表示。

      \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>

使用域名系统协议为 hostname 解析 IPv6 地址(AAAA 记录)。传给 callback 函数的 addresses 参数将包含 IPv6 地址数组。

\Uses the DNS protocol to resolve IPv6 addresses (AAAA records) for the hostname. The addresses argument passed to the callback function will contain an array of IPv6 addresses.

AltStyle によって変換されたページ (->オリジナル) /