MCPcopy Index your code
hub / github.com/koding/kite / sockjsHandlerWithRequest

Function sockjsHandlerWithRequest

tunnelproxy/proxy.go:94–104  ·  view source on GitHub ↗

sockjsHandlerWithRequest is a wrapper around the sockjs.Handler that includes a *http.Request context.

(
	prefix string,
	opts sockjs.Options,
	handleFunc func(sockjs.Session, *http.Request),
)

Source from the content-addressed store, hash-verified

92// sockjsHandlerWithRequest is a wrapper around the sockjs.Handler that
93// includes a *http.Request context.
94func sockjsHandlerWithRequest(
95 prefix string,
96 opts sockjs.Options,
97 handleFunc func(sockjs.Session, *http.Request),
98) http.Handler {
99 return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
100 sockjs.NewHandler(prefix, opts, func(session sockjs.Session) {
101 handleFunc(session, r)
102 }).ServeHTTP(w, r)
103 })
104}
105
106func (s *Proxy) CloseNotify() chan bool {
107 return s.closeC

Callers 1

NewFunction · 0.85

Calls 1

ServeHTTPMethod · 0.45

Tested by

no test coverage detected