diff --git a/examples/proxy/proxy.js b/examples/proxy/proxy.js index d2b8c72..d9f6cf1 100644 --- a/examples/proxy/proxy.js +++ b/examples/proxy/proxy.js @@ -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"); });