MCPcopy Create free account
hub / github.com/angular/dev-infra / _write

Method _write

github-actions/browserstack/set-browserstack-env.js:17835–17840  ·  view source on GitHub ↗

* @param {Buffer} chunk * @param {() => void} callback

(chunk, _, callback)

Source from the content-addressed store, hash-verified

17833 frame.frameData = Buffer.allocUnsafe(2);
17834 frame.frameData.writeUInt16BE(code, 0);
17835 } else if (code !== void 0 && reason !== void 0) {
17836 frame.frameData = Buffer.allocUnsafe(2 + reasonByteLength);
17837 frame.frameData.writeUInt16BE(code, 0);
17838 frame.frameData.write(reason, 2, "utf-8");
17839 } else {
17840 frame.frameData = emptyBuffer;
17841 }
17842 const socket = ws[kResponse].socket;
17843 socket.write(frame.createFrame(opcodes.CLOSE));

Callers

nothing calls this directly

Calls 4

__privateGetFunction · 0.70
__privateSetFunction · 0.70
pushMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected