aboutsummaryrefslogtreecommitdiffstats
path: root/src/transport/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/mod.rs')
-rw-r--r--src/transport/mod.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/transport/mod.rs b/src/transport/mod.rs
index 1de0633..96f7651 100644
--- a/src/transport/mod.rs
+++ b/src/transport/mod.rs
@@ -831,6 +831,13 @@ pub(crate) trait Transport: Send + Sync {
let _ = found;
}
+ /// Has the transport tell `reachable` whenever others may reach this node where they
+ /// couldn't before (libp2p: a relay granted it a slot, or AutoNAT found it public).
+ /// By default it never does.
+ fn on_reachable(&self, reachable: std::sync::Arc<tokio::sync::Notify>) {
+ let _ = reachable;
+ }
+
/// 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`.