MCPcopy Create free account
hub / github.com/dwgx/WindsurfAPI / grpcFrame

Function grpcFrame

src/grpc.js:75–83  ·  view source on GitHub ↗
(payload)

Source from the content-addressed store, hash-verified

73 * gRPC mode: uncompressed gRPC frame.
74 */
75export function grpcFrame(payload) {
76 const buf = Buffer.isBuffer(payload) ? payload : Buffer.from(payload);
77 if (USE_CONNECT) return wrapRequest(buf);
78 const frame = Buffer.alloc(5 + buf.length);
79 frame[0] = 0;
80 frame.writeUInt32BE(buf.length, 1);
81 buf.copy(frame, 5);
82 return frame;
83}
84
85/**
86 * Strip gRPC frame header (5 bytes) from a response buffer.

Callers 6

rawGetChatMessageMethod · 0.90
warmupCascadeMethod · 0.90
openCascadeMethod · 0.90
cascadeChatMethod · 0.90
sendMessageMethod · 0.90
getUserStatusMethod · 0.90

Calls 1

wrapRequestFunction · 0.90

Tested by

no test coverage detected