Display more information in proxy.js

This commit is contained in:
Romain Beaumont 2015-07-30 02:41:49 +02:00
parent 57f5b9d23d
commit a3c65de9a4

View file

@ -159,6 +159,8 @@ srv.on('login', function(client) {
console.log("client->server: Error in packetId " + state + ".0x" + packetId.value.toString(16));
console.log(buffer.toString('hex'));
console.log(packetBuff.toString('hex'));
console.log(buffer.length);
console.log(packetBuff.length);
}
});
targetClient.on('end', function() {
@ -167,9 +169,10 @@ srv.on('login', function(client) {
if(!endedClient)
client.end("End");
});
targetClient.on('error', function() {
targetClient.on('error', function(err) {
endedTargetClient = true;
console.log('Connection error by server', '(' + addr + ')');
console.log('Connection error by server', '(' + addr + ') ',err);
console.log(err.stack);
if(!endedClient)
client.end("Error");
});