MCPcopy Create free account
hub / github.com/MertJSX/folderhost / SendToAllExclude

Function SendToAllExclude

utils/web_socket_clients.go:59–68  ·  view source on GitHub ↗
(path string, mt int, message []byte, exclude *websocket.Conn)

Source from the content-addressed store, hash-verified

57}
58
59func SendToAllExclude(path string, mt int, message []byte, exclude *websocket.Conn) {
60 clientsMu.RLock()
61 defer clientsMu.RUnlock()
62
63 for conn, client := range clients {
64 if client.Path == path && conn != exclude {
65 go safeWriteMessage(conn, mt, message)
66 }
67 }
68}
69
70func SendToAll(path string, mt int, message []byte) {
71 clientsMu.RLock()

Callers 1

processWebSocketMessageFunction · 0.92

Calls 1

safeWriteMessageFunction · 0.85

Tested by

no test coverage detected