MCPcopy Create free account
hub / github.com/astercloud/aster / broadcastToAll

Method broadcastToAll

server/handlers/websocket.go:800–807  ·  view source on GitHub ↗

broadcastToAll broadcasts a message to all connected WebSocket clients

(messageType string, payload map[string]any)

Source from the content-addressed store, hash-verified

798
799// broadcastToAll broadcasts a message to all connected WebSocket clients
800func (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}

Callers 3

handleTodoCreateMethod · 0.95
handleTodoUpdateMethod · 0.95
handleTodoDeleteMethod · 0.95

Calls 1

sendMessageMethod · 0.95

Tested by

no test coverage detected