Skip to main content

connect_to_one

Function connect_to_one 

Source
async fn connect_to_one<R: Runtime>(
    rt: &R,
    addrs: &[SocketAddr],
    outbound_proxy: &Option<ProxyProtocol>,
) -> Result<(<R as NetStreamProvider>::Stream, SocketAddr)>
Expand description

Connect to one of the addresses in addrs by running connections in parallel until one works.

This implements a basic version of RFC 8305 “happy eyeballs”.