Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
flush() {
if (this.bufferedWrites !== '') {
uws.native.server.send(this.external, this.bufferedWrites, uws.OPCODE_BINARY);
this.bufferedWrites = '';
}
}
/**
spark.on('outgoing::data', (data) => {
const opcode = Buffer.isBuffer(data)
? uws.OPCODE_BINARY
: uws.OPCODE_TEXT;
native.server.send(socket, data, opcode, undefined, true);
});
});