Documentation ¶
Index ¶
- func Destroy()
- func Init()
- type ConnectionOption
- type HandleCloseFunc
- type HandleConnectFunc
- type HandleDisconnectFunc
- type HandleErrorFunc
- type HandleMessageFunc
- type HandlePongFunc
- type InitOption
- func InitWithConcurrentMessageHandling(concurrentMessageHandling bool) InitOption
- func InitWithMaxMessageBufferSize(messageBufferSize int) InitOption
- func InitWithMaxMessageSize(maxMessageSize int64) InitOption
- func InitWithPingPeriodSec(pingPeriodSec int64) InitOption
- func InitWithPongWaitSec(pongWaitSec int64) InitOption
- func InitWithWriteWaitSec(writeWaitSec int64) InitOption
- type InitOptions
- type Manager
- func (m *Manager) BroadCast(groupID string, msg []byte) error
- func (m *Manager) HandleClose(groupID string, handleCloseFunc HandleCloseFunc)
- func (m *Manager) HandleConnect(groupID string, handleConnectFunc HandleConnectFunc)
- func (m *Manager) HandleDisconnect(groupID string, handleDisconnectFunc HandleDisconnectFunc)
- func (m *Manager) HandleError(groupID string, handleErrorFunc HandleErrorFunc)
- func (m *Manager) HandleMessage(groupID string, handleMessageFunc HandleMessageFunc) error
- func (m *Manager) HandlePong(groupID string, handlePongFunc HandlePongFunc)
- func (m *Manager) HandleRequest(groupID string, w http.ResponseWriter, r *http.Request, ...) error
- func (m *Manager) RegisterHub(groupID string, opts ...InitOption)
- func (m *Manager) UnregisterHub(groupID string)
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 map[string]any) ConnectionOption
type HandleConnectFunc ¶
type HandleDisconnectFunc ¶
type HandleErrorFunc ¶
type HandleMessageFunc ¶
type HandlePongFunc ¶
type InitOption ¶ added in v1.5.19
type InitOption func(*InitOptions)
func InitWithConcurrentMessageHandling ¶ added in v1.5.19
func InitWithConcurrentMessageHandling(concurrentMessageHandling bool) InitOption
func InitWithMaxMessageBufferSize ¶ added in v1.5.19
func InitWithMaxMessageBufferSize(messageBufferSize int) InitOption
func InitWithMaxMessageSize ¶ added in v1.5.19
func InitWithMaxMessageSize(maxMessageSize int64) InitOption
func InitWithPingPeriodSec ¶ added in v1.5.19
func InitWithPingPeriodSec(pingPeriodSec int64) InitOption
func InitWithPongWaitSec ¶ added in v1.5.19
func InitWithPongWaitSec(pongWaitSec int64) InitOption
func InitWithWriteWaitSec ¶ added in v1.5.19
func InitWithWriteWaitSec(writeWaitSec int64) InitOption
type InitOptions ¶ added in v1.5.19
type InitOptions struct {
// contains filtered or unexported fields
}
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func GetInstance ¶
func GetInstance() *Manager
func (*Manager) HandleClose ¶
func (m *Manager) HandleClose(groupID string, handleCloseFunc HandleCloseFunc)
func (*Manager) HandleConnect ¶
func (m *Manager) HandleConnect(groupID string, handleConnectFunc HandleConnectFunc)
func (*Manager) HandleDisconnect ¶
func (m *Manager) HandleDisconnect(groupID string, handleDisconnectFunc HandleDisconnectFunc)
func (*Manager) HandleError ¶
func (m *Manager) HandleError(groupID string, handleErrorFunc HandleErrorFunc)
func (*Manager) HandleMessage ¶
func (m *Manager) HandleMessage(groupID string, handleMessageFunc HandleMessageFunc) error
func (*Manager) HandlePong ¶
func (m *Manager) HandlePong(groupID string, handlePongFunc HandlePongFunc)
func (*Manager) HandleRequest ¶
func (m *Manager) HandleRequest(groupID string, w http.ResponseWriter, r *http.Request, opts ...ConnectionOption) error
func (*Manager) RegisterHub ¶ added in v1.5.20
func (m *Manager) RegisterHub(groupID string, opts ...InitOption)
func (*Manager) UnregisterHub ¶ added in v1.5.20
Click to show internal directories.
Click to hide internal directories.