mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-10-03 07:59:50 -04:00
Display more information in proxy.js
This commit is contained in:
parent
57f5b9d23d
commit
a3c65de9a4
@ -159,6 +159,8 @@ srv.on('login', function(client) {
|
|||||||
console.log("client->server: Error in packetId " + state + ".0x" + packetId.value.toString(16));
|
console.log("client->server: Error in packetId " + state + ".0x" + packetId.value.toString(16));
|
||||||
console.log(buffer.toString('hex'));
|
console.log(buffer.toString('hex'));
|
||||||
console.log(packetBuff.toString('hex'));
|
console.log(packetBuff.toString('hex'));
|
||||||
|
console.log(buffer.length);
|
||||||
|
console.log(packetBuff.length);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
targetClient.on('end', function() {
|
targetClient.on('end', function() {
|
||||||
@ -167,9 +169,10 @@ srv.on('login', function(client) {
|
|||||||
if(!endedClient)
|
if(!endedClient)
|
||||||
client.end("End");
|
client.end("End");
|
||||||
});
|
});
|
||||||
targetClient.on('error', function() {
|
targetClient.on('error', function(err) {
|
||||||
endedTargetClient = true;
|
endedTargetClient = true;
|
||||||
console.log('Connection error by server', '(' + addr + ')');
|
console.log('Connection error by server', '(' + addr + ') ',err);
|
||||||
|
console.log(err.stack);
|
||||||
if(!endedClient)
|
if(!endedClient)
|
||||||
client.end("Error");
|
client.end("Error");
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user