Skip to content

newly stabilized std::net::lookup_host not very ergonomic to use #23700

Closed
@nwin

Description

@nwin

The new lookup_host method now returns SocketAddrs instead of an IpAddrs. Unfortunately the returned SocketAddr is not very useful because it defaults to port 0. Since SocketAddr does not have any setters for the port I basically have to re-create every single returned value to make use of it.

lookup_host should either take a port as an argument or only return IP addresses. I would prefer the latter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions