(token: string)
| 428 | } |
| 429 | |
| 430 | private authenticate(token: string): void { |
| 431 | const authReq: string = JSON.stringify( |
| 432 | defaultSerializer.serialize(new AuthenticationRequest(token)), |
| 433 | ); |
| 434 | const ws = this.getConnectedWebSocket(); |
| 435 | ws.send(authReq); |
| 436 | if (ws.ping !== undefined) { |
| 437 | ws.ping(); |
| 438 | } |
| 439 | } |
| 440 | |
| 441 | private getConnectedWebSocket() { |
| 442 | const ws = this.connection?.ws; |
no test coverage detected