refactor(client): rename ClientState to ClientPhase and introduce ActiveSession

This commit is contained in:
Nils Andreas Svee committed 2026-05-10 20:56:43 +07:00
1 parent 30675ff85f
commit e33b9b3f3f
2 files changed
+55 -25

No files matched your search

+15 -1
View File
@@ -8,13 +8,27 @@ pub struct NegotiatedParams {
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) enum ClientState {
pub(crate) enum ClientPhase {
Connected,
Open { token: u64 },
NoTestCompleted,
Closed,
}
#[derive(Debug)]
pub(crate) struct ActiveSession {
pub next_wire_seq: u32,
pub next_logical_seq: u64,
pub highest_received_seq: Option<u32>,
pub packets_sent: u64,
pub start_mono: Instant,
pub end_mono: Option<Instant>,
pub next_send_at: Instant,
pub pending: PendingMap,
pub completed: CompletedSet,
pub sending_done: bool,
}
pub(crate) fn validate_negotiated_params(
requested: &Params,
returned: &Params,