API 参考
正在准备搜索索引…

Dns

接口

MxRecord

邮件交换服务器记录。

SrvRecord

服务发现记录。

函数

getPublicAddress

通过 OpenDNS 查询指定地址族的公网出口地址,失败返回 undefined。

queryMx

查询邮件交换记录;默认超时 1 秒,查询失败返回空数组。

queryNs

查询域名服务器记录;默认使用系统 DNS、超时 1 秒,查询失败返回空数组。

querySrv

查询服务发现记录(如 _service._tcp.domain);失败返回空数组。

queryTxt

查询 TXT 记录;每条记录包含多个文本段,失败返回空数组。

resolve

异步解析 IPv4/IPv6 地址,失败返回 undefined。 servers 为空时使用系统解析器,timeout 不限制该路径;指定 DNS 时默认超时 1 秒。

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0