Misc tidying

This commit is contained in:
Michael Morrison 2014-02-01 09:47:39 -06:00
parent a3c14a8d42
commit add06a7d8f
4 changed files with 11 additions and 4 deletions

View file

@ -10,7 +10,7 @@ var udpSocket = dgram.createSocket('udp4');
udpSocket.unref();
udpSocket.bind(21943);
udpSocket.on('message', function(buffer, rinfo) {
if(Gamedig.debug) console.log("Received",buffer,rinfo.address,rinfo.port);
if(Gamedig.debug) console.log(rinfo.address+':'+rinfo.port+" <-- "+buffer.toString('hex'));
for(var i = 0; i < activeQueries.length; i++) {
var query = activeQueries[i];
if(

View file

@ -105,6 +105,9 @@ Reader.prototype = {
this.i += 4;
return r;
},
rest: function() {
return this.buffer.slice(this.i);
},
done: function() {
return this.i >= this.buffer.length;
}