dnsPromises.resolve4(hostname[, options])


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

    ¥hostname <string> Host name to resolve.

  • options <Object>

    • ttl <boolean> 检索每条记录的生存时间值 (TTL)。当为 true 时,Promise 使用 { address: '1.2.3.4', ttl: 60 } 对象数组而不是字符串数组进行解决,TTL 以秒表示。

      ¥ttl <boolean> Retrieve the Time-To-Live value (TTL) of each record. When true, the Promise is resolved with an array of { address: '1.2.3.4', ttl: 60 } objects rather than an array of strings, with the TTL expressed in seconds.

使用域名系统协议为 hostname 解析 IPv4 地址(A 记录)。当成功时,Promise 使用 IPv4 地址数值(例如 ['74.125.79.104', '74.125.79.105', '74.125.79.106'])解决。

¥Uses the DNS protocol to resolve IPv4 addresses (A records) for the hostname. On success, the Promise is resolved with an array of IPv4 addresses (e.g. ['74.125.79.104', '74.125.79.105', '74.125.79.106']).