Documentation
¶
Index ¶
- type Handler
- type SocketInterface
- type SocketV1
- func (s *SocketV1) Load(serv *ghttp.Server, prefix string)
- func (s *SocketV1) OnClose(id uuid.UUID, conn *websocket.Conn)
- func (s *SocketV1) OnConnect(ctx context.Context, conn *websocket.Conn)
- func (s *SocketV1) OnMessage(conn *WebsocketData, req []byte, msgType int)
- func (s *SocketV1) RegisterRouter(cmd int, handler Handler)
- func (s *SocketV1) Send(id uuid.UUID, data []byte) (err error)
- func (s *SocketV1) SendAll(data []byte)
- type WebsocketData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SocketInterface ¶
type SocketV1 ¶
type SocketV1 struct{}
func (*SocketV1) OnMessage ¶
func (s *SocketV1) OnMessage(conn *WebsocketData, req []byte, msgType int)
OnMessage
@Description: @receiver s @param msg @param msgType
func (*SocketV1) RegisterRouter ¶
注册方法,将某个消息路由器ID和对应的处理方法关联起来
Click to show internal directories.
Click to hide internal directories.