Add packets to protocol and threshold to client

This commit is contained in:
Will Franzen 2014-12-30 02:08:21 -06:00
parent ba4d871984
commit cfa30d9e1d
2 changed files with 7 additions and 0 deletions

View File

@ -30,6 +30,7 @@ function Client(isServer) {
this.encryptionEnabled = false;
this.cipher = null;
this.decipher = null;
this.compressionThreshold = -1;
this.packetsToParse = {};
this.on('newListener', function(event, listener) {
var direction = this.isServer ? 'toServer' : 'toClient';

View File

@ -58,6 +58,9 @@ var packets = {
success: {id: 0x02, fields: [
{ name: "uuid", type: "string" },
{ name: "username", type: "string" }
]},
compress: { id: 0x03, fields: [
{ name: "threshold", type: "varint"}
]}
},
toServer: {
@ -534,6 +537,9 @@ var packets = {
]},
kick_disconnect: {id: 0x40, fields: [
{ name: "reason", type: "string" }
]},
compress: { id: 0x46, fields: [
{ name: "threshold", type: "varint"}
]}
},
toServer: {