Explicitly state that the hijacked connection cannot be used after returning from HijackHandler

This commit is contained in:
Aliaksandr Valialkin
2016-02-12 19:29:35 +02:00
parent 9c9b5abffa
commit dde91b5c5b
+2
View File
@@ -321,6 +321,8 @@ type RequestCtx struct {
// HijackHandler must process the hijacked connection c.
//
// The connection c is automatically closed after returning from HijackHandler.
//
// The connection c must not be used after returning from the handler.
type HijackHandler func(c net.Conn)
// Hijack registers the given handler for connection hijacking.