MCPcopy Create free account
hub / github.com/ephraimduncan/opencode-cursor / frameConnectMessage

Function frameConnectMessage

src/proxy.ts:178–184  ·  view source on GitHub ↗

Connect protocol frame: [1-byte flags][4-byte BE length][payload]

(data: Uint8Array, flags = 0)

Source from the content-addressed store, hash-verified

176
177/** Connect protocol frame: [1-byte flags][4-byte BE length][payload] */
178function frameConnectMessage(data: Uint8Array, flags = 0): Buffer {
179 const frame = Buffer.alloc(5 + data.length);
180 frame[0] = flags;
181 frame.writeUInt32BE(data.length, 1);
182 frame.set(data, 5);
183 return frame;
184}
185
186/**
187 * Spawn the Node H2 bridge and return read/write handles.

Callers 5

makeHeartbeatBytesFunction · 0.85
sendKvResponseFunction · 0.85
sendExecResultFunction · 0.85
startBridgeFunction · 0.85
handleToolResultResumeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected