Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion test-fixture/src/sim/http3_connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ impl Node {
.mlkem(false)
.pmtud_iface_mtu(false),
),
boxed![ReachState::new(Http3State::Connected)],
// Also wait for the session ticket, so handling it is part of setup.
boxed![
ReachState::new(Http3State::Connected),
ReceiveResumptionToken
],
goals,
)
}
Expand Down Expand Up @@ -271,6 +275,20 @@ impl Goal for ReachState {
}
}

/// A target for a client that is reached once it has processed the server's session ticket.
#[derive(Debug, Clone, Copy)]
pub struct ReceiveResumptionToken;

impl Goal for ReceiveResumptionToken {
fn handle_event(&mut self, _c: &mut Endpoint, e: &Event, _now: Instant) -> GoalStatus {
if matches!(e, Event::Client(Http3ClientEvent::ResumptionToken(_))) {
GoalStatus::Done
} else {
GoalStatus::Waiting
}
}
}

/// A target for a connection that involves sending a given amount of data on the indicated stream.
#[derive(Debug, Clone)]
pub struct Requests {
Expand Down
Loading