diff --git a/http3/client.go b/http3/client.go index dcf57795..27c4947b 100644 --- a/http3/client.go +++ b/http3/client.go @@ -43,7 +43,7 @@ type roundTripperOpts struct { EnableDatagram bool MaxHeaderBytes int64 AdditionalSettings map[uint64]uint64 - StreamHijacker func(FrameType, quic.Stream) (hijacked bool, err error) + StreamHijacker func(FrameType, quic.Connection, quic.Stream) (hijacked bool, err error) } // client is a HTTP3 client doing requests @@ -152,7 +152,7 @@ func (c *client) handleBidirectionalStreams() { go func(str quic.Stream) { for { _, err := parseNextFrame(str, func(ft FrameType) (processed bool, err error) { - return c.opts.StreamHijacker(ft, str) + return c.opts.StreamHijacker(ft, c.conn, str) }) if err == errHijacked { return diff --git a/http3/roundtrip.go b/http3/roundtrip.go index 02914f9e..743ff034 100644 --- a/http3/roundtrip.go +++ b/http3/roundtrip.go @@ -56,7 +56,7 @@ type RoundTripper struct { // Callers can either process the frame and return control of the stream back to HTTP/3 // (by returning hijacked false). // Alternatively, callers can take over the QUIC stream (by returning hijacked true). - StreamHijacker func(FrameType, quic.Stream) (hijacked bool, err error) + StreamHijacker func(FrameType, quic.Connection, quic.Stream) (hijacked bool, err error) // Dial specifies an optional dial function for creating QUIC // connections for requests.