(dictionary, callback)
| 33 | #address; |
| 34 | |
| 35 | constructor(dictionary, callback) { |
| 36 | super({kind: "UDP"}); |
| 37 | this.#callback = callback; |
| 38 | this.#timer = Timer.repeat(() => { |
| 39 | if (!--this.#retry) |
| 40 | return this.failed("no response from SNTP server"); |
| 41 | |
| 42 | this.write(); |
| 43 | this.#callback(SNTP.retry); |
| 44 | }, 5000); |
| 45 | this.start(dictionary.host); |
| 46 | } |
| 47 | start(host) { |
| 48 | this.#retry = 5; |
| 49 |