Skip to content

SwiftQUIC: Expose Stateless Reset Token when CID is retired - #123

Open
agnosticdev wants to merge 7 commits into
mainfrom
agnosticdev/RetireCIDsWithToken
Open

SwiftQUIC: Expose Stateless Reset Token when CID is retired#123
agnosticdev wants to merge 7 commits into
mainfrom
agnosticdev/RetireCIDsWithToken

Conversation

@agnosticdev

Copy link
Copy Markdown
Collaborator

This change exposes an associated stateless reset token when a connection id is retired.
This is used on the server for cleanup purposes and tracking.

@agnosticdev
agnosticdev requested a review from josephnoir August 31, 2026 19:30
@agnosticdev agnosticdev added the ⚠️ semver/major Breaks existing public API. label Aug 31, 2026

@josephnoir josephnoir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!


public var newInboundCIDEventCount = 0
public var newOutboundCIDEventCount = 0
public var retiredOutboundCIDEventCount = 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the QUIC specific code should be in an extension.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to keep stored properties in the actual type.

case retiredInboundConnectionID(_ connectionID: QUICConnectionID)
case newOutboundConnectionID(_ connectionID: QUICConnectionID)
case retiredOutboundConnectionID(_ connectionID: QUICConnectionID)
case newOutboundConnectionID(_ connectionID: QUICConnectionID, statelessResetToken: QUICStatelessResetToken)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment about being in an extension

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved this into a QUIC specific file: e2377c1

@available(Network 0.1.0, *)
final class SwiftNetworkQUICCIDTests: NetTestCase {

func testQUICRetiredOutboundConnectionIDIncludesStatelessResetToken() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would argue that these should be in the QUICTest directory instead?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could split out the QUIC related files here but I think we should move that to a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚠️ semver/major Breaks existing public API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants