(topic: string, event: string, payload: Record<string, any>)
| 47 | } |
| 48 | |
| 49 | push(topic: string, event: string, payload: Record<string, any>) { |
| 50 | if (this.open) { |
| 51 | this.send(topic, event, payload); |
| 52 | } else { |
| 53 | this.queue.push({ topic, event, payload }); |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | private flush() { |
| 58 | while (this.queue.length > 0) { |