Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrHijackNotSupported = errors.New("ResponseWriter does not support hijacking")
ErrHijackNotSupported is returned when the ResponseWriter does not support hijacking.
Functions ¶
func HijackConnection ¶
func HijackConnection(w http.ResponseWriter, statusCode *int) (net.Conn, *bufio.ReadWriter, error)
HijackConnection hijacks the underlying connection from a ResponseWriter for WebSocket upgrades. It sets statusCode to 101 (Switching Protocols) and returns the hijacked connection.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.