mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-27 21:24:25 -04:00
print sent and received packet contents in debug mode
This commit is contained in:
parent
a48d6dcdd8
commit
664c7e380a
@ -91,6 +91,7 @@ Client.prototype.end = function(reason) {
|
||||
Client.prototype.write = function(packetId, params) {
|
||||
var buffer = createPacketBuffer(packetId, params, this.isServer);
|
||||
debug("writing packetId " + packetId + " (0x" + packetId.toString(16) + ")");
|
||||
debug(params);
|
||||
var out = this.encryptionEnabled ? new Buffer(this.cipher.update(buffer), 'binary') : buffer;
|
||||
this.socket.write(out);
|
||||
};
|
||||
|
@ -1282,6 +1282,7 @@ function parsePacket(buffer, isServer) {
|
||||
results[fieldInfo.name] = readResults.value;
|
||||
size += readResults.size;
|
||||
}
|
||||
debug(results);
|
||||
return {
|
||||
size: size,
|
||||
results: results,
|
||||
|
Loading…
x
Reference in New Issue
Block a user