MCPcopy
hub / github.com/websockets/ws / createBinaryFrame

Function createBinaryFrame

bench/parser.benchmark.js:18–25  ·  view source on GitHub ↗
(length)

Source from the content-addressed store, hash-verified

16};
17
18function createBinaryFrame(length) {
19 const list = Sender.frame(crypto.randomBytes(length), {
20 opcode: 0x02,
21 ...options
22 });
23
24 return Buffer.concat(list);
25}
26
27const pingFrame1 = Buffer.concat(
28 Sender.frame(crypto.randomBytes(5), { opcode: 0x09, ...options })

Callers 1

Calls 1

frameMethod · 0.80

Tested by

no test coverage detected