mirror of
https://github.com/golang/go
synced 2024-11-18 09:24:54 -07:00
fd0c0db4a4
The ResponseController type provides a discoverable interface to optional methods implemented by ResponseWriters. c := http.NewResponseController(w) c.Flush() vs. if f, ok := w.(http.Flusher); ok { f.Flush() } Add the ability to control per-request read and write deadlines via the ResponseController SetReadDeadline and SetWriteDeadline methods. For #54136 Change-Id: I3f97de60d4c9ff150cda559ef86c6620eee665d2 Reviewed-on: https://go-review.googlesource.com/c/go/+/436890 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Damien Neil <dneil@google.com>
7 lines
463 B
Plaintext
7 lines
463 B
Plaintext
pkg net/http, func NewResponseController(ResponseWriter) *ResponseController #54136
|
|
pkg net/http, method (*ResponseController) Flush() error #54136
|
|
pkg net/http, method (*ResponseController) Hijack() (net.Conn, *bufio.ReadWriter, error) #54136
|
|
pkg net/http, method (*ResponseController) SetReadDeadline(time.Time) error #54136
|
|
pkg net/http, method (*ResponseController) SetWriteDeadline(time.Time) error #54136
|
|
pkg net/http, type ResponseController struct #54136
|