MCPcopy Index your code
hub / github.com/atomicdata-dev/atomic-data-browser / handleMessage

Function handleMessage

lib/src/websockets.ts:29–36  ·  view source on GitHub ↗
(ev: MessageEvent, store: Store)

Source from the content-addressed store, hash-verified

27}
28
29function handleMessage(ev: MessageEvent, store: Store) {
30 if (ev.data.startsWith('COMMIT ')) {
31 const commit = ev.data.slice(7);
32 parseAndApply(commit, store);
33 } else {
34 console.warn('Unknown websocket message:', ev);
35 }
36}
37
38function handleError(ev: Event) {
39 console.log('websocket error:', ev);

Callers 1

startWebsocketFunction · 0.85

Calls 1

parseAndApplyFunction · 0.90

Tested by

no test coverage detected