Browse Source

onmessage expects socket as well

session-estimator
Mathias Buus 3 years ago
parent
commit
d25f055d13
  1. 4
      index.js

4
index.js

@ -77,8 +77,8 @@ class DHT extends EventEmitter {
return this._nat.port
}
onmessage (buf, rinfo) {
if (buf.byteLength > 1) this.io.onmessage(null, buf, rinfo)
onmessage (socket, buf, rinfo) {
if (buf.byteLength > 1) this.io.onmessage(socket, buf, rinfo)
}
bind () {

Loading…
Cancel
Save