Documentation ¶
Index ¶
- func NewUpgrader(f func(r *http.Request) bool) websocket.Upgrader
- func SetCheckOrigin(f func(r *http.Request) bool)
- type WsIns
- func (wsIns *WsIns) Close() error
- func (wsIns *WsIns) IsWebSocketCloseError(err error) bool
- func (wsIns *WsIns) ReadMessage() (messageType int, p []byte, err error)
- func (wsIns *WsIns) WriteCloseMessage(closeCode int, text string) error
- func (wsIns *WsIns) WritePingMessage() (err error)
- func (wsIns *WsIns) WriteTextMessage(data []byte) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetCheckOrigin ¶
Types ¶
type WsIns ¶
type WsIns struct { HTTPCtx *hfw.HTTPContext // contains filtered or unexported fields }
func NewWSWithUpgrader ¶
func (*WsIns) IsWebSocketCloseError ¶
func (*WsIns) ReadMessage ¶
func (*WsIns) WriteCloseMessage ¶
func (*WsIns) WritePingMessage ¶
func (*WsIns) WriteTextMessage ¶
Click to show internal directories.
Click to hide internal directories.