MCPcopy Create free account
hub / github.com/cloudflare/computer / wsStub

Function wsStub

script/computerd-soak.mjs:216–222  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

214// permessage-deflate so the soak can compare compressed and
215// uncompressed wire costs without rebuilding the computerd binary.
216function wsStub(url) {
217 const wsUrl = `${url.replace("http://", "ws://")}/ws`;
218 const ws = new WebSocket(wsUrl, {
219 perMessageDeflate: process.env.SOAK_NO_DEFLATE !== "1",
220 });
221 return newWebSocketRpcSession(ws);
222}
223
224// One write into computerd via the SyncRPC push path. senderRev=0
225// marks us as an external writer — the server applies as

Callers 1

mainFunction · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected