MCPcopy Index your code
hub / github.com/srcbookdev/srcbook / push

Method push

packages/web/src/clients/websocket/client.ts:49–55  ·  view source on GitHub ↗
(topic: string, event: string, payload: Record<string, any>)

Source from the content-addressed store, hash-verified

47 }
48
49 push(topic: string, event: string, payload: Record<string, any>) {
50 if (this.open) {
51 this.send(topic, event, payload);
52 } else {
53 this.queue.push({ topic, event, payload });
54 }
55 }
56
57 private flush() {
58 while (this.queue.length > 0) {

Callers 1

onMethod · 0.45

Calls 1

sendMethod · 0.95

Tested by

no test coverage detected