Skip to content

Add version of dns.lookup that returns all results #736

@jsha

Description

@jsha

The dns module provides two sets of methods: the resolve family, which directly resolves using the DNS protocol, and the lookup function, which uses the system resolver (through getaddrinfo) and returns at most one address.

It's often preferable to use the system resolver, since it can use things like mDNS. However, using the dns.lookup API makes it impossible to receive multiple IP addresses in response to a DNS query (See #708 for motivating example).

Proposal: Add a new function dns.lookupAll that behaves like dns.lookup, but returns all addresses given by getaddrinfo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dnsIssues and PRs related to the dns subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions