Documentation
¶
Index ¶
- Variables
- type MapServeMux
- func (s *MapServeMux) Handle(path string, h http.Handler)
- func (s *MapServeMux) HandleFunc(path string, h http.HandlerFunc)
- func (s *MapServeMux) HandleWSFunc(path string, h WSHandlerFunc)
- func (s *MapServeMux) Handler(r *http.Request) http.Handler
- func (s *MapServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *MapServeMux) StopHandling(path string)
- type WSHandlerFunc
- type WSOptions
- type WSReadWriter
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultUpgrader = websocket.Upgrader{ CheckOrigin: func(r *http.Request) bool { return true }, }
View Source
var DefaultWSOptions = WSOptions{ WriteTimeout: 5 * time.Second, ReadTimeout: 25 * time.Second, PingInterval: 20 * time.Second, }
View Source
var ErrUnexpectedMessageType = errors.New("unexpected non-binary message type")
ErrUnexpectedMessageType ...
Functions ¶
This section is empty.
Types ¶
type MapServeMux ¶
type MapServeMux struct {
// contains filtered or unexported fields
}
func NewMapServeMux ¶
func NewMapServeMux() *MapServeMux
func (*MapServeMux) HandleFunc ¶
func (s *MapServeMux) HandleFunc(path string, h http.HandlerFunc)
func (*MapServeMux) HandleWSFunc ¶
func (s *MapServeMux) HandleWSFunc(path string, h WSHandlerFunc)
func (*MapServeMux) ServeHTTP ¶
func (s *MapServeMux) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*MapServeMux) StopHandling ¶
func (s *MapServeMux) StopHandling(path string)
type WSHandlerFunc ¶
func (WSHandlerFunc) ServeHTTP ¶
func (h WSHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type WSReadWriter ¶
type WSReadWriter struct {
// contains filtered or unexported fields
}
WSReadWriter ...
func NewDefaultWSReadWriter ¶
func NewDefaultWSReadWriter(c *websocket.Conn) *WSReadWriter
NewDefaultWSReadWriter ...
func NewWSReadWriter ¶
func NewWSReadWriter(c *websocket.Conn, o WSOptions) *WSReadWriter
Click to show internal directories.
Click to hide internal directories.