Skip to main content

pick_endpoint

Function pick_endpoint 

Source
pub fn pick_endpoint(
    addrs: &[PeerAddr],
    supported: &[Protocol],
) -> Option<Endpoint>
Expand description

Pick the best endpoint from a list of peer addresses that matches one of the supported protocols. Returns the highest-priority (lowest number) matching endpoint.