(message, value, address, port)
| 47 | super({kind: "UDP", port: 123}); |
| 48 | } |
| 49 | callback(message, value, address, port) { |
| 50 | if (2 !== message) |
| 51 | return; |
| 52 | |
| 53 | const packet = new DataView(new ArrayBuffer(48)); |
| 54 | packet.setUint8(0, 0x24); |
| 55 | packet.setUint32(40, ((Date.now() / 1000) | 0) + 2208988800); |
| 56 | this.write(address, port, packet.buffer); |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | const timeService = {name: "ntp", protocol: "udp", port: 123, txt: {}}; |