function setDefaultResultOrder
Usage in Deno
import { setDefaultResultOrder } from "node:dns/promises";
setDefaultResultOrder(order: "ipv4first"
| "ipv6first"
| "verbatim"): void
Set the default value of order
in dns.lookup()
and [lookup](../../.././dns/promises/~/lookup)
. The value could be:
ipv4first
: sets defaultorder
toipv4first
.ipv6first
: sets defaultorder
toipv6first
.verbatim
: sets defaultorder
toverbatim
.
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.
void