refactor(irtt-client): modularize client components
This commit is contained in:
1 parent
6772a3def0
commit
7429beef79
6 files changed
+328
No files matched your search
@@ -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,
|
||||
},
|
||||
}
|
||||
Reference in new issue
Block a user