()
| 377 | } |
| 378 | |
| 379 | void onOpen() { |
| 380 | if (this.verbose) { |
| 381 | System.out.println(getFormattedDate() + "WsClient connected: " + this.url); |
| 382 | } |
| 383 | this.isConnected = true; |
| 384 | this.connectionEstablished = System.currentTimeMillis(); |
| 385 | this.lastPong = this.connectionEstablished; |
| 386 | this.connected.complete(true); |
| 387 | |
| 388 | // Start ping loop on a virtual thread; keep a reference so close() can interrupt it. |
| 389 | this.pingThread = Thread.ofVirtual().start(this::pingLoop); |
| 390 | } |
| 391 | |
| 392 | void onMessage(Object message) { |
| 393 | // Any received frame counts as keepalive — many exchanges (lbank, |
no test coverage detected