File manager - Edit - /home/webapp69.cm.in.th/u69319090038/Shop/node_modules/mysql2/lib/packets/ssl_request.js
Back
'use strict'; const ClientConstants = require('../constants/client'); const Packet = require('../packets/packet'); class SSLRequest { constructor(flags, charset, mariadbExtendedClientFlags) { this.clientFlags = flags | ClientConstants.SSL; this.charset = charset; this.mariadbExtendedClientFlags = mariadbExtendedClientFlags || 0; } toPacket() { const length = 36; const buffer = Buffer.allocUnsafe(length); const packet = new Packet(0, buffer, 0, length); buffer.fill(0); packet.offset = 4; packet.writeInt32(this.clientFlags); packet.writeInt32(0); // max packet size. todo: move to config packet.writeInt8(this.charset); // the last 4 of the 23 reserved bytes carry the MariaDB extended client // capabilities (zero when not negotiated, i.e. plain filler) packet.skip(19); packet.writeInt32(this.mariadbExtendedClientFlags); return packet; } } module.exports = SSLRequest;
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.26 |
proxy
|
phpinfo
|
Settings