()
| 28 | } |
| 29 | |
| 30 | async setup() { |
| 31 | if (this.setupPromise != null) { |
| 32 | return await this.setupPromise; |
| 33 | } |
| 34 | |
| 35 | this.setupPromise = (async () => { |
| 36 | await getSub().subscribe(this.name); |
| 37 | })(); |
| 38 | |
| 39 | return await this.setupPromise; |
| 40 | } |
| 41 | |
| 42 | addSocket(socket: WebSocket) { |
| 43 | this._sockets.add(socket); |