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,
},
EchoSent {
seq: u32,
remote: SocketAddr,
scheduled_at: Instant,
sent_at: ClientTimestamp,
bytes: usize,
send_call: Duration,
timer_error: Duration,
},
EchoReply {
seq: u32,
remote: SocketAddr,
sent_at: ClientTimestamp,
received_at: ClientTimestamp,
rtt: RttSample,
server_timing: Option<ServerTiming>,
one_way: Option<OneWayDelaySample>,
received_stats: Option<ReceivedStatsSample>,
bytes: usize,
packet_meta: PacketMeta,
},
EchoLoss {
seq: u32,
sent_at: ClientTimestamp,
timeout_at: Instant,
},
DuplicateReply {
seq: u32,
remote: SocketAddr,
received_at: ClientTimestamp,
bytes: usize,
},
LateReply {
seq: u32,
highest_seen: u32,
remote: SocketAddr,
sent_at: Option<ClientTimestamp>,
received_at: ClientTimestamp,
rtt: Option<RttSample>,
server_timing: Option<ServerTiming>,
one_way: Option<OneWayDelaySample>,
received_stats: Option<ReceivedStatsSample>,
bytes: usize,
packet_meta: PacketMeta,
},
Warning {
kind: WarningKind,
message: String,
at: ClientTimestamp,
},
}Expand description
Event emitted by an IRTT client session.
Events form the public lifecycle and measurement stream for callers. UIs
usually display lifecycle, warning, and per-packet events directly; summary
reporting should aggregate EchoSent, EchoReply, EchoLoss,
LateReply, and DuplicateReply events or pass the stream to
irtt-stats.
Variants§
SessionStarted
A normal session has opened and is ready to send echo probes.
Fields
remote: SocketAddrResolved remote socket address.
negotiated: NegotiatedParamsNegotiated protocol parameters for this session.
at: ClientTimestampClient timestamp when the open reply was accepted.
NoTestCompleted
A negotiation-only no-test exchange completed.
No EchoSent, EchoReply, EchoLoss, or SessionClosed events are
expected for this open outcome.
Fields
remote: SocketAddrResolved remote socket address.
negotiated: NegotiatedParamsNegotiated protocol parameters returned by the server.
at: ClientTimestampClient timestamp when the open reply was accepted.
SessionClosed
The client sent a close request and considers the session closed.
This is a local lifecycle event, not an acknowledgement from the server. Managed sessions disconnect event subscribers after the worker exits, while leaving already queued events available to drain.
Fields
remote: SocketAddrResolved remote socket address.
at: ClientTimestampClient timestamp when the close request was sent.
EchoSent
An echo request was sent.
This records local scheduling and send-call timing. It does not imply a
reply will arrive; callers should pair it with EchoReply, EchoLoss,
LateReply, or DuplicateReply by sequence number when displaying
packet lifecycle state.
Fields
remote: SocketAddrResolved remote socket address.
sent_at: ClientTimestampClient wall/monotonic timestamp captured for the send.
EchoReply
First in-window reply for a pending echo request.
This is the primary successful measurement event. RTT and optional server timing/statistics fields should generally be aggregated from this variant.
Fields
remote: SocketAddrResolved remote socket address.
sent_at: ClientTimestampClient timestamp recorded when the matching request was sent.
received_at: ClientTimestampClient timestamp recorded when the reply was received.
server_timing: Option<ServerTiming>Optional server-reported timestamps and processing time.
one_way: Option<OneWayDelaySample>Optional one-way delay values derived from client/server wall clocks.
received_stats: Option<ReceivedStatsSample>Optional server-reported received-statistics sample.
packet_meta: PacketMetaReceive-side metadata observed outside the IRTT wire payload.
EchoLoss
A sent echo request exceeded the local probe timeout before a reply was matched.
A later datagram for the same sequence may still arrive and will be
reported as ClientEvent::LateReply rather than changing this event.
Fields
sent_at: ClientTimestampClient timestamp recorded when the request was sent.
DuplicateReply
Additional reply for a sequence that was already completed.
Duplicates are not primary RTT samples. They are useful for diagnostics and packet counters, but should not be aggregated as successful first replies.
Fields
remote: SocketAddrResolved remote socket address.
received_at: ClientTimestampClient timestamp recorded when the duplicate was received.
LateReply
Reply for a sequence that was no longer pending.
This commonly means the probe had already been reported as lost, or the
reply arrived out of the client’s current tracking window. When the
original send metadata is still retained, RTT and one-way timing are
included; otherwise those fields are None.
Fields
remote: SocketAddrResolved remote socket address.
sent_at: Option<ClientTimestamp>Original client send timestamp, when still retained.
received_at: ClientTimestampClient timestamp recorded when the late reply was received.
server_timing: Option<ServerTiming>Optional server-reported timestamps and processing time.
one_way: Option<OneWayDelaySample>Optional one-way delay values derived from client/server wall clocks.
received_stats: Option<ReceivedStatsSample>Optional server-reported received-statistics sample.
packet_meta: PacketMetaReceive-side metadata observed outside the IRTT wire payload.
Warning
Non-fatal condition observed while receiving or classifying packets.
Warning events are diagnostic. They do not close the session by themselves and are not measurement samples.
Fields
kind: WarningKindMachine-readable warning category.
at: ClientTimestampClient timestamp when the warning was emitted.
Trait Implementations§
Source§impl Clone for ClientEvent
impl Clone for ClientEvent
Source§fn clone(&self) -> ClientEvent
fn clone(&self) -> ClientEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClientEvent
impl Debug for ClientEvent
impl Eq for ClientEvent
Source§impl PartialEq for ClientEvent
impl PartialEq for ClientEvent
Source§fn eq(&self, other: &ClientEvent) -> bool
fn eq(&self, other: &ClientEvent) -> bool
self and other values to be equal, and is used by ==.