Added decoding of messages

Also moved things out to their own files and setup require()s to bring it all together.
This commit is contained in:
Parnic
2018-03-30 16:07:56 -05:00
parent af02f60791
commit b6ee816fb3
9 changed files with 259 additions and 86 deletions

12
messages/SLLoginMessage.js Executable file
View File

@ -0,0 +1,12 @@
const SLMessage = require('./SLMessage.js').SLMessage;
exports.SLLoginMessage = class SLLoginMessage extends SLMessage {
constructor() {
super(0, 27);
this.writeInt32LE(348); // schema
this.writeInt32LE(0); // connection type
this.writeSLString('node-screenlogic'); // version
this.writeSLBuffer(Buffer.alloc(16)); // encoded password. empty/unused for local connections
this.writeInt32LE(2); // procID
}
}