diff options
| author | tv <tv@krebsco.de> | 2026-10-28 03:43:37 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-28 03:43:37 +0100 |
| commit | ff6d98bdd5f921942eb2b37d313d3b9d18acee40 (patch) | |
| tree | ef98a1542aee821006ece373c1ece536cc0e9596 /src/transport/identity.rs | |
| parent | 5184885fcec433d636060e5a4e889fa78827dadc (diff) | |
get swarm RTT from paths
Diffstat (limited to 'src/transport/identity.rs')
| -rw-r--r-- | src/transport/identity.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/transport/identity.rs b/src/transport/identity.rs index 153dacc..0c4cda4 100644 --- a/src/transport/identity.rs +++ b/src/transport/identity.rs @@ -496,6 +496,12 @@ impl Transport for IdentityTransport { true } + /// The best path's, where messages to `peer` go. + fn rtt(&self, peer: &str) -> Option<Duration> { + let address = self.shared.proven_at(peer).into_iter().next()?; + self.shared.paths.rtt(&address) + } + /// The identity layer's, and each transport's. fn stats(&self) -> TransportStats { let mut stats = self.shared.paths.stats(); |
