MCPcopy Create free account
hub / github.com/BUPT-GAMMA/MASFactory / sendText

Method sendText

masfactory-visualizer/src/runtime/wsServer.ts:116–120  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

114 }
115
116 public sendText(text: string): void {
117 if (this.closed) {return;}
118 const payload = Buffer.from(text, 'utf8');
119 this.socket.write(encodeFrame(0x1, payload));
120 }
121
122 public sendJson(value: unknown): void {
123 this.sendText(JSON.stringify(value));

Callers 1

sendJsonMethod · 0.95

Calls 1

encodeFrameFunction · 0.85

Tested by

no test coverage detected