refactor(irtt-client): modularize client components

This commit is contained in:
Nils Andreas Svee committed 2026-04-28 16:33:05 +07:00
1 parent 7b26115a35
commit 01d4466bc2
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,
},
}