http3: fix documentation for Hijacker and HTTPStreamer (#5089)

* http3: update documentation for `Hijacker`

The documentation for `Hijacker` seems to be legacy from
[v0.43.0](https://github.com/quic-go/quic-go/releases/tag/v0.43.0). This
commit updates the documentation to reflect the current API use.

* http3: update documentation for `HTTPStreamer`

The documentation for `HTTPStreamer` seems to be legacy from
[v0.43.0](https://github.com/quic-go/quic-go/releases/tag/v0.43.0). This
commit updates the documentation to reflect the current API use.
This commit is contained in:
TheoTechnicguy
2025-04-29 03:55:43 +02:00
committed by GitHub
parent f2b1842d52
commit a9d8093eaf
2 changed files with 2 additions and 3 deletions

View File

@@ -9,7 +9,7 @@ import (
"github.com/quic-go/quic-go"
)
// A Hijacker allows hijacking of the stream creating part of a quic.Connection from a http.Response.Body.
// A Hijacker allows hijacking of the stream creating part of a quic.Connection from a http.ResponseWriter.
// It is used by WebTransport to create WebTransport streams after a session has been established.
type Hijacker interface {
Connection() Connection

View File

@@ -14,8 +14,7 @@ import (
"golang.org/x/net/http/httpguts"
)
// The HTTPStreamer allows taking over a HTTP/3 stream. The interface is implemented the http.Response.Body.
// On the client side, the stream will be closed for writing, unless the DontCloseRequestStream RoundTripOpt was set.
// The HTTPStreamer allows taking over a HTTP/3 stream. The interface is implemented by the http.ResponseWriter.
// When a stream is taken over, it's the caller's responsibility to close the stream.
type HTTPStreamer interface {
HTTPStream() Stream