mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-27 13:14:41 -04:00
added debug output for read/written packet ids
This commit is contained in:
parent
b699d5506a
commit
936ba5832d
@ -79,6 +79,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) + ")");
|
||||
var out = this.encryptionEnabled ? new Buffer(this.cipher.update(buffer), 'binary') : buffer;
|
||||
this.socket.write(out);
|
||||
};
|
||||
|
@ -1256,6 +1256,8 @@ function parsePacket(buffer, isServer) {
|
||||
return {
|
||||
error: new Error("Unrecognized packetId: " + packetId + " (0x" + packetId.toString(16) + ")")
|
||||
}
|
||||
} else {
|
||||
debug("read packetId " + packetId + " (0x" + packetId.toString(16) + ")");
|
||||
}
|
||||
var i, fieldInfo, read, readResults;
|
||||
for (i = 0; i < packetInfo.length; ++i) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user