12345678910111213141516171819202122 |
- package ws
- import (
- "github.com/go-admin-team/go-admin-core/logger"
- )
- var WebsocketManager Manager
- func init() {
- WebsocketManager = Manager{
- Group: make(map[string]map[string]*Client),
- Register: make(chan *Client, 128),
- UnRegister: make(chan *Client, 128),
- GroupMessage: make(chan *GroupMessageData, 128),
- Message: make(chan *MessageData, 128),
- MessageString: make(chan *MessageDataString, 128),
- BroadCastMessage: make(chan *BroadCastMessageData, 128),
- groupCount: 0,
- clientCount: 0,
- }
- logger.Debug("init websocket success.")
- }
|