Trait tor_linkspec::HasAddrs

source ·
pub trait HasAddrs {
    // Required method
    fn addrs(&self) -> &[SocketAddr];
}
Expand description

An object that represents a host on the network which may have known IP addresses.

Required Methods§

source

fn addrs(&self) -> &[SocketAddr]

Return the addresses listed for this server.

NOTE that these addresses are not necessarily ones that we should connect to directly! They can be useful for telling where a server is located, or whether it is “close” to another server, but without knowing the associated protocols you cannot use these to launch a connection.

Also, for some servers, we may not actually have any relevant addresses; in that case, the returned slice is empty.

To see how to connect to a relay, use HasChanMethod::chan_method

Implementors§