feat(client): expose probe send commitment through typed receipts
This commit is contained in:
18 files changed
+322
-122
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user