refactor(irtt-client): modularize client components

This commit is contained in:
Nils Andreas Svee committed 2026-05-10 20:56:43 +07:00
1 parent 6772a3def0
commit 7429beef79
6 files changed
+328

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
use std::net::SocketAddr;
use crate::{session::NegotiatedParams, timing::ClientTimestamp};
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum OpenOutcome {
Started {
remote: SocketAddr,
token: u64,
negotiated: NegotiatedParams,
event: ClientEvent,
},
NoTestCompleted {
remote: SocketAddr,
negotiated: NegotiatedParams,
event: ClientEvent,
},
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum ClientEvent {
SessionStarted {
remote: SocketAddr,
token: u64,
negotiated: NegotiatedParams,
at: ClientTimestamp,
},
NoTestCompleted {
remote: SocketAddr,
negotiated: NegotiatedParams,
at: ClientTimestamp,
},
SessionClosed {
remote: SocketAddr,
token: u64,
at: ClientTimestamp,
},
Warning {
message: String,
},
}