j7/node_modules/mysql/lib/protocol/packets/UseOldPasswordPacket.js
aozhiwei 33f9c8d06a 1
2022-04-15 00:46:09 +08:00

15 lines
379 B
JavaScript

module.exports = UseOldPasswordPacket;
function UseOldPasswordPacket(options) {
options = options || {};
this.firstByte = options.firstByte || 0xfe;
}
UseOldPasswordPacket.prototype.parse = function(parser) {
this.firstByte = parser.parseUnsignedNumber(1);
};
UseOldPasswordPacket.prototype.write = function(writer) {
writer.writeUnsignedNumber(1, this.firstByte);
};