()
| 33 | } |
| 34 | |
| 35 | open() { |
| 36 | let url = this.baseUrl + "/api/ws"; |
| 37 | this.logToOutput("opening ws to " + url, "Client"); |
| 38 | this.ws = new WebSocket(url, { |
| 39 | timeout: 10, |
| 40 | }); |
| 41 | this.ws.onopen = this.wsOnOpen.bind(this); |
| 42 | this.ws.onclose = this.wsOnClose.bind(this); |
| 43 | this.ws.onmessage = this.wsOnMessage.bind(this); |
| 44 | } |
| 45 | |
| 46 | send(cmd: WsCommand) { |
| 47 | if (this.ws) { |
no test coverage detected