Nresolve4
Bun

namespace

dns.resolve4

function resolve4(
hostname: string,
callback: (err: null | ErrnoException, addresses: string[]) => void
): void;

Uses the DNS protocol to resolve a IPv4 addresses (A records) for the hostname. The addresses argument passed to the callback function will contain an array of IPv4 addresses (e.g.['74.125.79.104', '74.125.79.105', '74.125.79.106']).

@param hostname

Host name to resolve.

function resolve4(
hostname: string,
callback: (err: null | ErrnoException, addresses: RecordWithTtl[]) => void
): void;

Uses the DNS protocol to resolve a IPv4 addresses (A records) for the hostname. The addresses argument passed to the callback function will contain an array of IPv4 addresses (e.g.['74.125.79.104', '74.125.79.105', '74.125.79.106']).

@param hostname

Host name to resolve.

function resolve4(
hostname: string,
options: ResolveOptions,
callback: (err: null | ErrnoException, addresses: string[] | RecordWithTtl[]) => void
): void;

Uses the DNS protocol to resolve a IPv4 addresses (A records) for the hostname. The addresses argument passed to the callback function will contain an array of IPv4 addresses (e.g.['74.125.79.104', '74.125.79.105', '74.125.79.106']).

@param hostname

Host name to resolve.

namespace resolve4