From 06179a9df971636dd6c5e9f438baa9f133854830 Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 27 Oct 2026 02:02:15 +0100 Subject: add support for several transports --- src/transport/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/transport/mod.rs') diff --git a/src/transport/mod.rs b/src/transport/mod.rs index 52db406..cbbef45 100644 --- a/src/transport/mod.rs +++ b/src/transport/mod.rs @@ -537,6 +537,14 @@ pub(crate) trait Transport: Send + Sync { vec![peer.to_owned()] } + /// Whether this node has a way to reach `peer` at all: an address of it on one of + /// its transports. Members it can't reach aren't its neighbours (`swarm::topology`). + /// By default yes, as for `local_addresses`. + fn can_reach(&self, peer: &str) -> bool { + let _ = peer; + true + } + /// Where others say `peer` can be reached (the member list, a HELLO_REPLY): hints, /// to be checked before they are relied on. By default nothing to learn, as for /// `local_addresses`. -- cgit v1.3.1