resolve4 - Node documentation
function resolve4

Usage

import { resolve4 } from "node:dns";

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']).

Parameters

hostname: string

Host name to resolve.

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

Return Type

void

Parameters

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

Return Type

void

Parameters

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

Return Type

void