Skip to content

SwiftQUIC: Provide path events when QUICPath changes or is validated#55

Open
agnosticdev wants to merge 2 commits into
mainfrom
agnosticdev/PathChanges
Open

SwiftQUIC: Provide path events when QUICPath changes or is validated#55
agnosticdev wants to merge 2 commits into
mainfrom
agnosticdev/PathChanges

Conversation

@agnosticdev

Copy link
Copy Markdown
Collaborator

There is a need for swift-nio-quic to observe events when QUICPath changes or becomes validated. This typically happens during connection migration. It is not appropriate to expose QUICPath directly so this change exposes a new type called QUICPathInfo that carries local and remote Endpoint information about the new datagram path underneath QUIC when it changes. When QUICPath changes or becomes validated QUIC checks with the lower protocol (UDP) to obtain the endpoints of the new path below it and sends a QUICEvent that can be observed at the connection level through an object such as NewStreamFlowHarness and the application level can update needed info based on these events.

Design considerations: QUICPathInfo needs to be Sendable because DomainSpecificNetworkProtocolEvent is Sendable. Endpoint is not Sendable and so I had to expose it through a computed property here. That is the need for PathAddress on QUICPathInfo.

@agnosticdev

Copy link
Copy Markdown
Collaborator Author

Another design consideration for swift-nio-quic is that this change takes into account a defined UDP and IP stack running underneath QUIC. In swift-nio-quic, QUIC sits on top of a UDP socket and so we will need to further enhance this change to know when the clients endpoint has changed there also so we can properly expose an event in this case as well.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant