std.net.HostName.connect: rework to avoid waiting for DNS

The previous implementation would eagerly attempt TCP connection upon
receiving a DNS reply, but it would still wait for all the DNS results
before returning from the function.

This implementation returns immediately upon first successful TCP
connection, canceling not only in-flight TCP connection attempts but
also unfinished DNS queries.
adaef433d2Andrew Kelley committed on 10/29/2025, 1:20:49 PMparentd3c4158
1 file changedLine totals unavailable