Documentation ¶
Index ¶
Constants ¶
View Source
const ( // TunnelWebSocketProtocol is a subprotocol that allows client and server recognize each other. // See https://tools.ietf.org/html/rfc6455#section-11.3.4. TunnelWebSocketProtocol = "ws-tunnel" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HttpHandler ¶
type HttpHandler struct { Ctx context.Context AcceptOptions websocket.AcceptOptions Sink chan<- net.Conn // ReadLimit. Optional. See websocket.Conn.SetReadLimit(). ReadLimit int64 }
func (*HttpHandler) ServeHTTP ¶
func (h *HttpHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ListenerWrapper ¶
type ListenerWrapper struct { AcceptOptions websocket.AcceptOptions // ReadLimit. Optional. See websocket.Conn.SetReadLimit(). ReadLimit int64 ReadTimeout time.Duration ReadHeaderTimeout time.Duration WriteTimeout time.Duration IdleTimeout time.Duration MaxHeaderBytes int ConnState func(net.Conn, http.ConnState) ErrorLog *log.Logger BaseContext func(net.Listener) context.Context ConnContext func(ctx context.Context, c net.Conn) context.Context }
Click to show internal directories.
Click to hide internal directories.