diff options
| author | tv <tv@krebsco.de> | 2026-10-27 02:02:15 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-27 02:02:15 +0100 |
| commit | 06179a9df971636dd6c5e9f438baa9f133854830 (patch) | |
| tree | 17544f5a8a9bff042cd17cd27860d574e303d523 /src/transport/mod.rs | |
| parent | 2593edca179e86883e74c7039629564f4ea6ec55 (diff) | |
add support for several transports
Diffstat (limited to 'src/transport/mod.rs')
| -rw-r--r-- | src/transport/mod.rs | 8 |
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`. |
