Documentation ¶
Index ¶
- type ExitWithDoingNothing
- type Handler
- type ResponseWriter
- type Websocket
- func (ws *Websocket) AfterConnected(handler func(w ResponseWriter))
- func (ws *Websocket) BeforeClose(handler func(w ResponseWriter, err error))
- func (ws *Websocket) Close() error
- func (ws *Websocket) Register(type_ string, handler Handler)
- func (ws *Websocket) Run()
- func (ws *Websocket) Upgrade(w http.ResponseWriter, r *http.Request) error
- func (ws *Websocket) Write(p []byte) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExitWithDoingNothing ¶
type ExitWithDoingNothing struct { }
主动离开
func (ExitWithDoingNothing) Error ¶
func (e ExitWithDoingNothing) Error() string
type Handler ¶
type Handler func(w ResponseWriter, r *apistructs.WebsocketRequest) error
type ResponseWriter ¶
type Websocket ¶
type Websocket struct {
// contains filtered or unexported fields
}
func (*Websocket) AfterConnected ¶
func (ws *Websocket) AfterConnected(handler func(w ResponseWriter))
func (*Websocket) BeforeClose ¶
func (ws *Websocket) BeforeClose(handler func(w ResponseWriter, err error))
Click to show internal directories.
Click to hide internal directories.