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.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/transport/mod.rs b/src/transport/mod.rs
index a15a1f7..9d28212 100644
--- a/src/transport/mod.rs
+++ b/src/transport/mod.rs
@@ -428,6 +428,18 @@ pub(crate) struct Link {
pub(crate) rtt_us: Option<u32>,
/// Silent for long (`peers.md`, dormancy).
pub(crate) dormant: bool,
+ /// The peer's other transports (`swarm::links::MAX_OTHERS` at most): where else
+ /// it proved itself, those paths up.
+ pub(crate) others: Vec<OtherPath>,
+}
+
+/// A transport of a link besides the one in use, in a LINKS_REPLY.
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+pub(crate) struct OtherPath {
+ /// Its scheme (`mycelium`, `libp2p`, `tor`).
+ pub(crate) transport: String,
+ /// The round trip of its fastest path, in microseconds, if any is measured.
+ pub(crate) rtt_us: Option<u32>,
}
#[derive(Clone, Serialize, Deserialize)]