MCPcopy Index your code
hub / github.com/codeaashu/claude-code / forwardToWs

Function forwardToWs

src/upstreamproxy/relay.ts:436–442  ·  view source on GitHub ↗
(ws: WebSocketLike, data: Buffer)

Source from the content-addressed store, hash-verified

434}
435
436function forwardToWs(ws: WebSocketLike, data: Buffer): void {
437 if (ws.readyState !== WebSocket.OPEN) return
438 for (let off = 0; off < data.length; off += MAX_CHUNK_BYTES) {
439 const slice = data.subarray(off, off + MAX_CHUNK_BYTES)
440 ws.send(encodeChunk(slice))
441 }
442}
443
444function cleanupConn(st: ConnState | undefined): void {
445 if (!st) return

Callers 2

handleDataFunction · 0.85
openTunnelFunction · 0.85

Calls 2

encodeChunkFunction · 0.85
sendMethod · 0.65

Tested by

no test coverage detected