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 | 9d60b8596f2b49e54d8a0811212b3dc2df94e1bd (patch) | |
| tree | c18012acfd26644673949112fcb774ad0a5b4286 /src/transport/identity.rs | |
| parent | 3fa8f9e360f0f7384986f2814f82b1124c25b8da (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(); |
