aboutsummaryrefslogtreecommitdiffstats
path: root/src/transport/mod.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-10-27 02:02:15 +0100
committertv <tv@krebsco.de>2026-10-27 02:02:15 +0100
commit1639b17f011379b886cb15db38f997d59a962849 (patch)
tree1417ead3872ade72e4d8a1ab4a715f26b0ba6335 /src/transport/mod.rs
parent027a0920b81e7ee3e0f3eb4f0b3cbbb559133252 (diff)
add support for several transports
Diffstat (limited to 'src/transport/mod.rs')
-rw-r--r--src/transport/mod.rs8
1 files changed, 8 insertions, 0 deletions
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`.