Versions in this module Expand all Collapse all v1 v1.0.1 Jan 5, 2022 Changes in this version + var WebsocketManager = Manager + func SendAll(msg []byte) + func SendGroup(msg []byte) + func SendOne(ctx context.Context, id string, group string, msg []byte) + func WsLogout(id string, group string) + type BroadCastMessageData struct + Message []byte + type Client struct + CancelFunc context.CancelFunc + Context context.Context + Group string + Id string + Message chan []byte + Socket *websocket.Conn + func (c *Client) Read(cxt context.Context) + func (c *Client) Write(cxt context.Context) + type GroupMessageData struct + Group string + Message []byte + type Manager struct + BroadCastMessage chan *BroadCastMessageData + Group map[string]map[string]*Client + GroupMessage chan *GroupMessageData + Lock sync.Mutex + Message chan *MessageData + Register chan *Client + UnRegister chan *Client + func (manager *Manager) Info() map[string]interface{} + func (manager *Manager) LenClient() uint + func (manager *Manager) LenGroup() uint + func (manager *Manager) RegisterClient(client *Client) + func (manager *Manager) Send(cxt context.Context, id string, group string, message []byte) + func (manager *Manager) SendAll(message []byte) + func (manager *Manager) SendAllService() + func (manager *Manager) SendGroup(group string, message []byte) + func (manager *Manager) SendGroupService() + func (manager *Manager) SendService() + func (manager *Manager) Start() + func (manager *Manager) UnRegisterClient(client *Client) + func (manager *Manager) UnWsClient(c *gin.Context) + func (manager *Manager) WsClient(c *gin.Context) + type MessageData struct + Context context.Context + Group string + Id string + Message []byte