Skip to content

Careful resume structs + encode/decode code #5131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Jun 21, 2025
Merged
Changes from 5 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
26 changes: 26 additions & 0 deletions src/core/congestion_control.h
Original file line number Diff line number Diff line change
@@ -171,6 +171,32 @@ typedef struct QUIC_CONGESTION_CONTROL {

} QUIC_CONGESTION_CONTROL;


//
// V1 supports careful resume on 1 path per remote endpoint
//
typedef struct QUIC_CONN_CAREFUL_RESUME_V1 {

// Path RTT parameters
uint64_t SmoothedRtt;
uint64_t MinRtt;

// Remote endpoint and the Path RTT parameters help match the path during Careful Resume
QUIC_ADDR RemoteEndpoint;

// Future Expiration Time in Unix Epoch microsecond units
uint64_t Expiration;

// Congestion algorithm last used
QUIC_CONGESTION_CONTROL_ALGORITHM Algorithm;

// CWND size in bytes for Careful Resume
uint32_t CongestionWindow;

} QUIC_CONN_CAREFUL_RESUME_V1;

typedef struct QUIC_CONN_CAREFUL_RESUME_V1 QUIC_CONN_CAREFUL_RESUME_STATE;

//
// Initializes the algorithm specific congestion control algorithm.
//
2 changes: 2 additions & 0 deletions src/core/connection.c
Original file line number Diff line number Diff line change
@@ -2054,6 +2054,7 @@ QuicConnSendResumptionTicket(
AppDataLength,
AppResumptionData,
Connection->HandshakeTP,
NULL, // No Careful Resumption data
AlpnLength,
Connection->Crypto.TlsState.NegotiatedAlpn + 1,
&TicketBuffer,
@@ -2112,6 +2113,7 @@ QuicConnRecvResumptionTicket(
Connection->Configuration->AlpnList,
Connection->Configuration->AlpnListLength,
&ResumedTP,
NULL, // No Careful Resumption data
&AppData,
&AppDataLength);
if (QUIC_FAILED(Status)) {
Loading
Oops, something went wrong.
Loading
Oops, something went wrong.