dnsPromises.setDefaultResultOrder(order)
order<string> 必须是'ipv4first'、'ipv6first'或'verbatim'。
在 dns.lookup() 和 dnsPromises.lookup() 中设置 order 的默认值。该值可以是:
【Set the default value of order in dns.lookup() and
dnsPromises.lookup(). The value could be:】
ipv4first:将默认order设置为ipv4first。ipv6first:将默认order设置为ipv6first。verbatim:将默认order设置为verbatim。
默认值是 verbatim,dnsPromises.setDefaultResultOrder() 的优先级高于 --dns-result-order。使用 工作线程 时,主线程的 dnsPromises.setDefaultResultOrder() 不会影响工作线程中的默认 DNS 顺序。
【The default is verbatim and dnsPromises.setDefaultResultOrder() have
higher priority than --dns-result-order. When using worker threads,
dnsPromises.setDefaultResultOrder() from the main thread won't affect the
default dns orders in workers.】