(msg: ServerControlMessage)
| 565 | } |
| 566 | |
| 567 | private sendControl(msg: ServerControlMessage): void { |
| 568 | const ws = this.ws; |
| 569 | if (ws === null || ws.readyState !== ws.OPEN) return; |
| 570 | try { |
| 571 | ws.send(JSON.stringify(msg)); |
| 572 | } catch { |
| 573 | // ignore — ws may have just closed |
| 574 | } |
| 575 | } |
| 576 | |
| 577 | private startCursorTimer(): void { |
| 578 | if (this.cursorTimer) clearInterval(this.cursorTimer); |
no test coverage detected