Skip to main content

reachable_endpoint

Function reachable_endpoint 

Source
pub async fn reachable_endpoint(
    server: &DiscoveredServer,
    timeout: Duration,
) -> Result<String>
Expand description

Returns the first endpoint of one server record that accepts a TCP connection.

This is discover_reachable_endpoint for a host that has already chosen the record, for example by its name: the same IPv4-first walk and the same probe, with timeout as the budget for each address instead of the library’s default.

§Errors

Returns an error when the record names no dialable endpoint, and one naming every attempt when all addresses refused or timed out.