mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-06 07:07:33 +00:00
Remove callback support and global Gamedig.debug option
This commit is contained in:
parent
fdc08b5c09
commit
dfa5c95efc
5 changed files with 28 additions and 46 deletions
|
|
@ -312,10 +312,6 @@ class Core extends EventEmitter {
|
|||
const rtt = end-start;
|
||||
this.registerRtt(rtt);
|
||||
}
|
||||
this.debugLog(log => {
|
||||
log(fromAddress + ':' + fromPort + " <--UDP");
|
||||
log(HexUtil.debugDump(buffer));
|
||||
});
|
||||
const result = onPacket(buffer);
|
||||
if (result !== undefined) {
|
||||
this.debugLog("UDP send finished by callback");
|
||||
|
|
@ -325,7 +321,7 @@ class Core extends EventEmitter {
|
|||
reject(e);
|
||||
}
|
||||
};
|
||||
socket.addCallback(socketCallback);
|
||||
socket.addCallback(socketCallback, this.options.debug);
|
||||
});
|
||||
timeout = Promises.createTimeout(this.options.socketTimeout, 'UDP');
|
||||
const wrappedTimeout = new Promise((resolve, reject) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue