(options)
| 43 | socket = new Socket({kind: "UDP"}); |
| 44 | |
| 45 | constructor(options) { |
| 46 | this.socket.callback = this.callback.bind(this); |
| 47 | this.timer = Timer.repeat(this.task.bind(this), 1000); |
| 48 | } |
| 49 | add(request) { |
| 50 | request.state = 0; |
| 51 | request.id = request.host.endsWith(".local") ? 0 : ((Math.random() * 65535) | 1); |