Skip to content
velt/net/dns exports

velt/net/dns

API reference

Host name resolution through the system resolver. For a walkthrough, read the guide.

import { lookup } from "velt/net/dns";

Exports

functionasync

lookup

#std/net/dns/lookup.vlt:10

Re-exported from velt/net/dns/lookup

async function lookup(host: string): Promise<string[]>

Every IP address of host (IPv4 and IPv6, in resolver order, without duplicates). Throws IoError with code "ENOENT" when the name does not resolve.

functionasync

lookupOne

#std/net/dns/lookup.vlt:15

Re-exported from velt/net/dns/lookup

async function lookupOne(host: string): Promise<string>

The first address of host (the one a connect would try first).