diff --git a/lib/client.js b/lib/client.js index a89ba5b..2131496 100644 --- a/lib/client.js +++ b/lib/client.js @@ -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); }; diff --git a/lib/protocol.js b/lib/protocol.js index 38459c6..9554586 100644 --- a/lib/protocol.js +++ b/lib/protocol.js @@ -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) {