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
http3: alternative API for stream hijacking #4405
Comments
Alternatively, we could have the http3 layer wrap a Not sure what to do with datagrams, since the HTTP layer takes total control of both receiving and sending. This is less of a problem for |
Yet another alternative, and what I believe will work best: We'll have the WebTransport layer wrap the For the server we don't need to anything, since we already have a Line 260 in 183d42a
For the client, we'll introduce a new struct, the Servers still need to be able to hijack the Extended CONNECT request, so we won't be able to remove all hijacker. However, all they need is the ability to take over the stream. They don't need to be able to access the Support HTTP Datagrams (#3522) will be very straightforward from here:
|
After playing around with this proposal for a while now, I concluded that it doesn't really work. It's just too complicated to pass the connection back and forth between the WebTransport and the HTTP/3 layer. However, there's another thing we can do. We can simplify these callback by making them less general: WebTransport uses stream types for unidirectional streams, and signal values for bidirectional streams: http3.Server{
SignalValues map[uint64]func(quic.Stream)
UniStreamType map[uint64]func(quic.ReceiveStream)
} This is a significant simplification over the current callbacks: Fewer function parameters, and once called, the stream is WebTransport's responsibility (there's no way for the WebTransport layer to give the stream back to HTTP/3). Open question: do we still need to pass the connection (or the connection tracing ID) to these callbacks? |
Probably yes. The |
This is just a quick thought I had, and might not work at all. Instead of adding stream hijacker callbacks (both for unidirectional and bidirectional) streams, we could introduce an
Server.ServeStream
method.The WebTransport layer would then be responsible for spawning a QUIC listener, accepting a QUIC connection, and accepting streams from that connection. It would then decide where a stream belongs (i.e. is it an HTTP/3 stream or a WebTransport stream?) and then pass HTTP/3 streams to the
Server
.Analogously for the
RoundTripper
.Open question: How do we send SETTINGS, and how do we handle the peer's SETTINGS and QPACK unidirectional streams?
The text was updated successfully, but these errors were encountered: