aboutsummaryrefslogtreecommitdiffstats
path: root/src/transport
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-04 22:15:18 +0100
committertv <tv@krebsco.de>2026-11-04 22:15:18 +0100
commita1585a3db53ee59fe941622d698638322b585267 (patch)
tree097f53b4cb6efe4e0da54d01f960a707cc0b7922 /src/transport
parente1e6c8b8faead6c348f1b775baa50a30867c0016 (diff)
hop delays
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/mod.rs3
-rw-r--r--src/transport/wire.rs3
2 files changed, 5 insertions, 1 deletions
diff --git a/src/transport/mod.rs b/src/transport/mod.rs
index 426ef72..ae6b593 100644
--- a/src/transport/mod.rs
+++ b/src/transport/mod.rs
@@ -671,6 +671,9 @@ pub(crate) struct SyncEnvelope {
/// heads, and the sender awaits no answer. A receiver it leaves level with the
/// sender answers nothing; one that has changes the sender lacks answers with them.
pub(crate) delivered: bool,
+ /// When the sender generated it, by its clock: the receiver takes how long it took
+ /// to come (`swarm::hop`).
+ pub(crate) sent: crate::clock::UnixMillis,
}
/// What a sync envelope carries.
diff --git a/src/transport/wire.rs b/src/transport/wire.rs
index 4199927..d1b3353 100644
--- a/src/transport/wire.rs
+++ b/src/transport/wire.rs
@@ -14,7 +14,7 @@ use super::{EncodedMessage, MessageKind, ParsedMessage};
/// The wire format's version, the first byte of every payload. Bump it with every change
/// to a message type or a codec (`golden_bytes` fails then).
-pub(crate) const VERSION: u8 = 25;
+pub(crate) const VERSION: u8 = 26;
/// What the second byte of a payload says.
fn tag(kind: MessageKind) -> u8 {
@@ -411,6 +411,7 @@ pub(crate) fn samples() -> Vec<ParsedMessage> {
ready: true,
writer: Some(7),
delivered: true,
+ sent: crate::clock::UnixMillis(8),
}),
ParsedMessage::Status(status.clone()),
ParsedMessage::StatusReply(status),