MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / broadcast

Function broadcast

utils/scripts/dev.js:245–254  ·  view source on GitHub ↗
(wss, message)

Source from the content-addressed store, hash-verified

243}
244
245function broadcast(wss, message) {
246 if (typeof message !== "string") {
247 message = JSON.stringify(message);
248 }
249 for (const client of wss.clients) {
250 if (client.readyState === 1) {
251 client.send(message);
252 }
253 }
254}
255
256// ─── cordova helpers ─────────────────────────────────────────────────────────
257

Callers 2

createServerFunction · 0.85
mainFunction · 0.85

Calls 1

sendMethod · 0.65

Tested by

no test coverage detected