Documentation ¶
Index ¶
- func ConvertHandler(wsHandler Handler) gin.HandlerFunc
- type BaseHandler
- func (bh *BaseHandler) CheckOrigin(r *http.Request) bool
- func (bh *BaseHandler) MaxMessageSize() int64
- func (bh *BaseHandler) OnClose(hub Hub, code int, text string)
- func (bh *BaseHandler) OnPing(hub Hub, appData string)
- func (bh *BaseHandler) OnPong(hub Hub, appData string)
- func (bh *BaseHandler) ReadBufferSize() int
- func (bh *BaseHandler) ReadTimeout() zone.Duration
- func (bh *BaseHandler) WriteBufferSize() int
- func (bh *BaseHandler) WriteTimeout() zone.Duration
- type Handler
- type Hub
- type Msg
- func (wm *Msg) Byte() *[]byte
- func (wm *Msg) Error() error
- func (wm *Msg) JSON(dataPtr interface{}) error
- func (wm *Msg) ProtoBuf(dataPtr proto.Message) error
- func (wm *Msg) SendDone()
- func (wm *Msg) SetByte(msgType int, msg *[]byte)
- func (wm *Msg) SetJSON(data interface{})
- func (wm *Msg) SetProtoBuf(data proto.Message)
- func (wm *Msg) SetString(data string)
- func (wm *Msg) String() string
- func (wm *Msg) Type() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertHandler ¶
func ConvertHandler(wsHandler Handler) gin.HandlerFunc
Types ¶
type BaseHandler ¶
type BaseHandler struct { }
func (*BaseHandler) CheckOrigin ¶
func (bh *BaseHandler) CheckOrigin(r *http.Request) bool
func (*BaseHandler) MaxMessageSize ¶
func (bh *BaseHandler) MaxMessageSize() int64
func (*BaseHandler) OnPing ¶
func (bh *BaseHandler) OnPing(hub Hub, appData string)
func (*BaseHandler) OnPong ¶
func (bh *BaseHandler) OnPong(hub Hub, appData string)
func (*BaseHandler) ReadBufferSize ¶
func (bh *BaseHandler) ReadBufferSize() int
func (*BaseHandler) ReadTimeout ¶
func (bh *BaseHandler) ReadTimeout() zone.Duration
func (*BaseHandler) WriteBufferSize ¶
func (bh *BaseHandler) WriteBufferSize() int
func (*BaseHandler) WriteTimeout ¶
func (bh *BaseHandler) WriteTimeout() zone.Duration
Click to show internal directories.
Click to hide internal directories.