Documentation ¶
Index ¶
- func Destroy()
- func Init()
- type ConnectionOption
- type HandleCloseFunc
- type HandleConnectFunc
- type HandleDisconnectFunc
- type HandleErrorFunc
- type HandleMessageFunc
- type HandlePongFunc
- type Manager
- func (m *Manager) BroadCast(groupID string, msg []byte) error
- func (m *Manager) HandleClose(handleCloseFunc HandleCloseFunc)
- func (m *Manager) HandleConnect(handleConnectFunc HandleConnectFunc)
- func (m *Manager) HandleDisconnect(handleDisconnectFunc HandleDisconnectFunc)
- func (m *Manager) HandleError(handleErrorFunc HandleErrorFunc)
- func (m *Manager) HandleMessage(handleMessageFunc HandleMessageFunc)
- func (m *Manager) HandlePong(handlePongFunc HandlePongFunc)
- func (m *Manager) HandleRequest(groupID string, w http.ResponseWriter, r *http.Request, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnectionOption ¶ added in v1.5.16
func WithConnectionContext ¶ added in v1.5.16
func WithConnectionContext(context any) ConnectionOption
type HandleCloseFunc ¶
type HandleConnectFunc ¶
type HandleDisconnectFunc ¶
type HandleErrorFunc ¶
type HandleMessageFunc ¶
type HandlePongFunc ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func GetInstance ¶
func GetInstance() *Manager
func (*Manager) HandleClose ¶
func (m *Manager) HandleClose(handleCloseFunc HandleCloseFunc)
func (*Manager) HandleConnect ¶
func (m *Manager) HandleConnect(handleConnectFunc HandleConnectFunc)
func (*Manager) HandleDisconnect ¶
func (m *Manager) HandleDisconnect(handleDisconnectFunc HandleDisconnectFunc)
func (*Manager) HandleError ¶
func (m *Manager) HandleError(handleErrorFunc HandleErrorFunc)
func (*Manager) HandleMessage ¶
func (m *Manager) HandleMessage(handleMessageFunc HandleMessageFunc)
func (*Manager) HandlePong ¶
func (m *Manager) HandlePong(handlePongFunc HandlePongFunc)
func (*Manager) HandleRequest ¶
func (m *Manager) HandleRequest(groupID string, w http.ResponseWriter, r *http.Request, opts ...ConnectionOption) error
Click to show internal directories.
Click to hide internal directories.