MCPcopy Index your code
hub / github.com/nodejs/node / isControlFrame

Function isControlFrame

deps/undici/src/lib/web/websocket/util.js:165–171  ·  view source on GitHub ↗

* @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.5 * @param {number} opcode * @returns {boolean}

(opcode)

Source from the content-addressed store, hash-verified

163 * @returns {boolean}
164 */
165function isControlFrame (opcode) {
166 return (
167 opcode === opcodes.CLOSE ||
168 opcode === opcodes.PING ||
169 opcode === opcodes.PONG
170 )
171}
172
173/**
174 * @param {number} opcode

Callers 3

isValidOpcodeFunction · 0.70
runMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected