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), )
| 92 | // sockjsHandlerWithRequest is a wrapper around the sockjs.Handler that |
| 93 | // includes a *http.Request context. |
| 94 | func 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 | |
| 106 | func (s *Proxy) CloseNotify() chan bool { |
| 107 | return s.closeC |