Skip to content

Experimental WebTransport support - #162

Draft
fpseverino wants to merge 5 commits into
swift-server:mainfrom
fpseverino:webtransport
Draft

fpseverino wants to merge 5 commits into
swift-server:mainfrom
fpseverino:webtransport

Conversation

@fpseverino

Copy link
Copy Markdown

This PR adds the necessary utilities to the public API to support WebTransport over HTTP/3 sessions (following draft-ietf-webtrans-http3-16).

Since Extended CONNECT and HTTP Datagrams are already supported, what is missing is a way to open QUIC streams to the client and receive them. SwiftNIO HTTP/3 currently does not allow to open and intercept incoming QUIC streams on an HTTP/3 connection, but I’ve opened a pull request there to add support for it.

Methods for opening streams have been added to NIOHTTPServer.Connection, and the AsyncStreams that receive incoming streams can be accessed via NIOHTTPServer.Reader. Everything is hidden behind the "UnstableWebTransport" package trait.

I’ve also included an example of how to set up a WebTransport server using swift-http-server and these new APIs.

I still regard these APIs as experimental. I have opened this draft PR so that we can start a discussion on the subject, having a rough idea of the API.
There are still many WebTransport features, such as Flow Control, that have not been implemented. The features implemented in this PR are only the essential ones.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant