-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor WebTransport Implementation
Summary: This is a big diff, but I think most of the change is moving code from HTTPTransaction to WebTransportImpl. The purpose is to make the general implementation of webtransport available for re-use by a subsequent `QuicWebTransport` component, which will implement the WebTransport API on a raw QUIC connection, rather than within HTTP. This allows future protocols (eg: moqt) to be implemented against the WebTransport interface in a fashion that is agnostic to WT over HTTP or raw QUIC transports. The most significant functional change is in how read and write callbacks for webtransport streams are handled. Previously, HQSession had a single read and write callback per CONNECT stream for any webtransport streams that were under there. This required another hashtable to dispatch the callbacks to the proper webtransport stream objects. Since we already had to allocate an object per webtransport stream, I changed it to directly implement the new `quic::StreamWriteCallback` and `quic::StreamWriteCallback`. This *does* pull in one quic dependency into the HTTPTransaction chain. It's a bit unfortunate, but all other implementations lead to an extra hashtable indirection, object allocation, or both. The WebTransportImpl class requires a TransportProvider, which implements the basic reading/writing of streams and datagrams and a SessionProvider, which for now handles only stream closure. HTTPTransaction implements SessionProvider while HTTPTransaction::Transport implements TransportProvider. Reviewed By: hanidamlaj Differential Revision: D56782852 fbshipit-source-id: 18506bb1f3a75f3f7afe00bde621f0be99bc8c05
- Loading branch information
1 parent
a17d926
commit 7e4a032
Showing
11 changed files
with
785 additions
and
601 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.