Skip to content

std.Io.net: non-concurrent versions of HostName.lookup and HostName.connect #25744

@andrewrk

Description

@andrewrk

Extracted from #25592.

The default version of std.Io.net.HostName.lookup should first try the concurrent version, but upon receiving error.ConcurrencyUnavailable falls back to a non-concurrent version.

The non-concurrent version should sort results according to a tasteful subset of RFC 3484/6724 (Destination Address Selection).

Likewise, there should additionally be a non-concurrent version of std.Io.net.HostName.connect which tries results in order, stopping upon first success. This will prevent serial code from pessimizing the concurrent version by attempting more than one connection after already receiving success. Again, default version should try concurrently first, falling back to serial version.

Both concurrent and non-concurrent versions should also be independently callable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSolving this issue will likely involve adding new logic or components to the codebase.standard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions