feat(client): expose probe send commitment through typed receipts

This commit is contained in:
Nils Andreas Svee committed 2026-10-04 19:14:06 +07:00
1 parent eebe83986a
commit a6ba335302
18 files changed
+322 -122

No files matched your search

@@ -83,13 +83,16 @@ fn main() {
}
if now < end && now >= next_send {
match client.send_probe() {
Ok(events) => {
events.iter().for_each(print_event);
Ok(receipt) => {
print_event(&receipt.into());
while next_send <= Instant::now() {
next_send += interval;
}
}
Err(err) => {
if let irtt_client::SendProbeError::AfterCommit { receipt, .. } = &err {
print_event(&(*receipt).into());
}
eprintln!("send failed: {err}");
break;
}
+5 -2
View File
@@ -121,13 +121,16 @@ async fn run() {
if Instant::now() < end && Instant::now() >= next_send {
match client.send_probe().await {
Ok(events) => {
events.iter().for_each(print_event);
Ok(receipt) => {
print_event(&receipt.into());
while next_send <= Instant::now() {
next_send += interval;
}
}
Err(err) => {
if let irtt_client::SendProbeError::AfterCommit { receipt, .. } = &err {
print_event(&(*receipt).into());
}
eprintln!("send failed: {err}");
break;
}