broadcastToAll broadcasts a message to all connected WebSocket clients
(messageType string, payload map[string]any)
| 798 | |
| 799 | // broadcastToAll broadcasts a message to all connected WebSocket clients |
| 800 | func (h *WebSocketHandler) broadcastToAll(messageType string, payload map[string]any) { |
| 801 | h.mu.RLock() |
| 802 | defer h.mu.RUnlock() |
| 803 | |
| 804 | for _, wsConn := range h.connections { |
| 805 | h.sendMessage(wsConn, messageType, payload) |
| 806 | } |
| 807 | } |
no test coverage detected