MCPcopy
hub / github.com/OpenNHP/opennhp / send

Method send

endpoints/js-agent/src/transport/websocket.ts:109–115  ·  view source on GitHub ↗

* Send data over the WebSocket

(data: Uint8Array)

Source from the content-addressed store, hash-verified

107 * Send data over the WebSocket
108 */
109 send(data: Uint8Array): void {
110 if (!this.ws || this.state !== 'connected') {
111 throw new Error('WebSocket is not connected');
112 }
113
114 this.ws.send(data);
115 }
116
117 /**
118 * Register an event handler

Callers

nothing calls this directly

Calls 1

sendMethod · 0.65

Tested by

no test coverage detected