Documentation ¶
Index ¶
- func Destroy()
- func Init(opts ...InitOption)
- 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(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 ¶
func Init ¶
func Init(opts ...InitOption)
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 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(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.