(options, list)
| 755 | #onError; |
| 756 | |
| 757 | constructor(options, list) { |
| 758 | this.#onReady = options.onReady; |
| 759 | this.#onError = options.onError; |
| 760 | this.#claim = dnssd.claim({ |
| 761 | ...options, |
| 762 | onReady: () => this.#onReady?.(), |
| 763 | onError: () => this.#onError?.(), |
| 764 | }); |
| 765 | this.#list = list; |
| 766 | list.push(this); |
| 767 | } |
| 768 | close() { |
| 769 | if (!this.#claim) return; |
| 770 | dnssd.unclaim(this.#claim); |