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

Method flush

packages/web/src/clients/websocket/client.ts:57–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55 }
56
57 private flush() {
58 while (this.queue.length > 0) {
59 const message = this.queue.shift()!;
60 this.send(message.topic, message.event, message.payload);
61 }
62 }
63
64 private send(topic: string, event: string, payload: Record<string, any>) {
65 const message = JSON.stringify([topic, event, payload]);

Callers 1

WebSocketClientClass · 0.95

Calls 1

sendMethod · 0.95

Tested by

no test coverage detected