* @param {Buffer} chunk * @param {() => void} callback
(chunk, _, callback)
| 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)); |
nothing calls this directly
no test coverage detected