Expand description
The peer the caller wants to reach (PeerTarget) and the connection they get back
(PeerConnection).
To the caller, crate::connect “just connects to a peer” — they describe the peer once and
receive an mTLS-authenticated PeerConnection whose remote peer_id has been verified. Which
traversal method got there is reported (observability) but never something the caller must
choose or handle.
Structs§
- Peer
Connection - An established, mutually-authenticated, multiplexed connection to a peer.
- Peer
Target - A description of the peer to connect to.
Functions§
- is_
ipv6_ first - Whether
addrsis ALREADY ordered IPv6-first (every IPv6 candidate at or before every IPv4 candidate) — i.e.sort_ipv6_firstwould be a no-op. - sort_
ipv6_ first - Sort a candidate list IPv6-first: every IPv6 address precedes every IPv4 address, preserving
the relative order within each family (a stable sort). This is the single place the IPv6-first
ordering rule is applied. Ordering is decided by the address FAMILY (
SocketAddr::is_ipv6), never by inspecting the string form (a bracketed[v6]:portand anv4:portboth contain ‘:’).