http3: implement new API to allow fine-grained control of connections#5512
http3: implement new API to allow fine-grained control of connections#5512marten-seemann merged 1 commit intomasterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5512 +/- ##
==========================================
+ Coverage 84.08% 84.12% +0.04%
==========================================
Files 158 159 +1
Lines 16291 16338 +47
==========================================
+ Hits 13697 13743 +46
- Misses 1962 1966 +4
+ Partials 632 629 -3 ☔ View full report in Codecov by Sentry. |
Introduce raw HTTP/3 client and server APIs with GOAWAY handling and stream accept loops in
|
fec317c to
befdd20
Compare
befdd20 to
eefd481
Compare
758ca8b to
6da53e9
Compare
40009a1 to
f39ce17
Compare
bbe54e5 to
9d189b3
Compare
9d189b3 to
06fbff7
Compare
There was a problem hiding this comment.
Pull request overview
This PR implements a new low-level API for WebTransport support in HTTP/3. The main changes include refactoring the internal Conn type to rawConn, and introducing new public types RawServerConn and RawClientConn that allow applications to manually manage stream accept loops.
Key changes:
- Introduced
RawServerConnandRawClientConnfor manual stream handling - Refactored
Connto internalrawConnwith callback-based architecture - Moved GOAWAY handling from
rawConntoClientConn - Extracted request handling logic into
server_conn.go
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
integrationtests/self/http_raw_conn_test.go |
New integration test demonstrating RawServerConn and RawClientConn usage with manual stream accept loops |
http3/transport_test.go |
Fixed test to use actual connection instead of nil |
http3/transport.go |
Added NewRawClientConn method and goroutine for handling unidirectional streams in NewClientConn |
http3/stream_test.go |
Updated tests to use newRawConn and improved error message clarity |
http3/stream.go |
Changed Stream.conn from *Conn to *rawConn; improved error message |
http3/server_conn.go |
New file containing RawServerConn implementation for handling HTTP/3 requests |
http3/server.go |
Refactored to use RawServerConn; extracted request handling into server_conn.go |
http3/response_writer.go |
Changed responseWriter.conn from *Conn to *rawConn |
http3/mock_clientconn_test.go |
Added handleUnidirectionalStream mock method |
http3/headers.go |
Extracted decodeTrailers function for reuse |
http3/conn_test.go |
Updated tests for new rawConn API with explicit stream handling; fixed push stream error code tests |
http3/conn.go |
Refactored Conn to rawConn with callback-based architecture |
http3/client_test.go |
Added tests for GOAWAY handling and new Raw API; moved tests from conn_test.go |
http3/client.go |
Refactored ClientConn to use rawConn internally; added RawClientConn and GOAWAY handling logic |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This API will be used by WebTransport.
Fixes #4405.