Unreviewed changes
4 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: internal/http3/transport.go
Insertions: 13, Deletions: 1.
@@ -31,6 +31,8 @@
Endpoint *quic.Endpoint
// Config is the QUIC configuration used for client connections.
+ // The Config may be nil.
+ //
// Dial may clone and modify the Config.
// The Config must not be modified after calling Dial.
Config *quic.Config
@@ -86,6 +88,8 @@
}
// A ClientConn is a client HTTP/3 connection.
+//
+// Multiple goroutines may invoke methods on a ClientConn simultaneously.
type ClientConn struct {
qconn *quic.Conn
@@ -115,8 +119,16 @@
}
// Close closes the connection.
+// Any in-flight requests are canceled.
+// Close does not wait for the peer to acknowledge the connection closing.
func (cc *ClientConn) Close() error {
- return cc.qconn.Close()
+ // Close the QUIC connection immediately with a status of NO_ERROR.
+ cc.qconn.Abort(nil)
+
+ // Return any existing error from the peer, but don't wait for it.
+ ctx, cancel := context.WithCancel(context.Background())
+ cancel()
+ return cc.qconn.Wait(ctx)
}
// RoundTrip sends a request on the connection.
```
Change information
Commit message:
internal/http3: add Transport and ClientConn
Add the first rudiments of an HTTP/3 client.
The client currently opens a QUIC connection and creates a control
stream on it, and nothing else.
Add surrounding test infrastructure for examining the client's
behavior. Tests use the experimental testing/synctest package
and will only run when the Go version is at least Go 1.24 and
GOEXPERIMENT=synctest is set.
For golang/go#70914
Change-Id: I19803187a8e62c461f60d7a1d44c2a408377e342
Files:
- A internal/http3/http3_test.go
- A internal/http3/settings.go
- M internal/http3/stream.go
- M internal/http3/stream_test.go
- A internal/http3/transport.go
- A internal/http3/transport_test.go
Change size: L
Delta: 6 files changed, 896 insertions(+), 0 deletions(-)
Branch: refs/heads/master
Submit Requirements:
Code-Review: +2 by Brad Fitzpatrick, +2 by Jonathan Amsterdam
TryBots-Pass: LUCI-TryBot-Result+1 by Go LUCI