feat(client): implement core echo probe sending and receiving logic

This commit is contained in:
Nils Andreas Svee committed 2026-05-10 20:56:43 +07:00
1 parent cebce832ff
commit c373b957d5
3 files changed
+380 -13

No files matched your search

+7 -4
View File
@@ -1,6 +1,12 @@
use std::time::Instant;
use irtt_proto::{Params, PROTOCOL_VERSION};
use crate::{config::NegotiationPolicy, error::ClientError};
use crate::{
config::NegotiationPolicy,
error::ClientError,
probe::{CompletedSet, PendingMap},
};
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct NegotiatedParams {
@@ -50,9 +56,6 @@ pub(crate) fn validate_negotiated_params(
reason: "length increased".to_owned(),
});
}
// TODO/OPEN: apply a documented negotiated interval safety floor once the
// clean spec or black-box report defines one. For now, only reject
// impossible non-positive intervals.
if returned.interval_ns <= 0 {
return Err(ClientError::NegotiationRejected {
reason: "interval must be positive".to_owned(),