mirror of
https://github.com/labstack/echo.git
synced 2024-12-22 20:06:21 +02:00
bc1e1904f1
* Allow ResponseWriters to unwrap writers when flushing/hijacking
18 lines
327 B
Go
18 lines
327 B
Go
//go:build go1.20
|
|
|
|
package echo
|
|
|
|
import (
|
|
"bufio"
|
|
"net"
|
|
"net/http"
|
|
)
|
|
|
|
func responseControllerFlush(rw http.ResponseWriter) error {
|
|
return http.NewResponseController(rw).Flush()
|
|
}
|
|
|
|
func responseControllerHijack(rw http.ResponseWriter) (net.Conn, *bufio.ReadWriter, error) {
|
|
return http.NewResponseController(rw).Hijack()
|
|
}
|