dns.resolveTxt(hostname, callback)
hostname
<string>callback
<Function>err
<Error>
使用域名系统协议为 hostname
解析文本查询(TXT
记录)。
传给 callback
函数的 records
参数是可用于 hostname
(例如 [ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]
)的文本记录的二维数组。
每个子数组包含一条记录的 TXT 块。
根据用例,这些可以连接在一起或单独处理。
hostname
<string>callback
<Function>err
<Error>records
<string[][]>
Uses the DNS protocol to resolve text queries (TXT
records) for the
hostname
. The records
argument passed to the callback
function is a
two-dimensional 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.