Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/interop/clients/js-native/tail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ try {
frame.payload.every((byte) => byte === sequence),
"corrupt datagram",
);
assert.equal(frame.timestamp, undefined, "unexpected IETF timestamp");
// An untimed datagram's timestamp is unscaled at its sequence.
assert.equal(frame.timestamp.key, BigInt(sequence), "datagram timestamp is not its sequence");
process.stdout.write(`datagram ${sequence}\n`);
}
console.error("datagram clean groups=0,1,2,3 bytes=3600");
Expand Down
9 changes: 6 additions & 3 deletions test/interop/clients/rust/tail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ async fn main() -> anyhow::Result<()> {
let route = origin.route(&args[3], moq_net::origin::RouteOptions::hidden())?;
let broadcast = route.broadcast();
if datagram {
// Untimed: the OBJECT_DATAGRAM carries no timestamp, so the subscriber can
// check the payload alone. Stay open until each one is acknowledged.
// Untimed: each datagram's timestamp is unscaled at its sequence, which the
// OBJECT_DATAGRAM carries as its group ID. Stay open until each one is acknowledged.
let mut track = broadcast.create_datagrams("tail", moq_net::datagram::Info::default())?;
route.announce()?;
let session = client
Expand Down Expand Up @@ -233,7 +233,10 @@ async fn main() -> anyhow::Result<()> {
frame.payload.iter().all(|byte| *byte == sequence as u8),
"corrupt datagram"
);
ensure!(frame.timestamp.scale().is_none(), "unexpected IETF timestamp");
ensure!(
frame.timestamp == moq_net::Timestamp::unscaled(sequence),
"datagram timestamp is not its sequence"
);
println!("datagram {sequence}");
}
eprintln!("datagram clean groups=0,1,2,3 bytes=3600");
Expand Down