This commit is contained in:
GaoHao
2025-03-10 17:26:39 +08:00
parent 490c513f48
commit cc97b6acca
26 changed files with 258 additions and 305 deletions

View File

@@ -35,6 +35,7 @@ class WebsocketUtil {
this.socketTask.onOpen((res) => {
console.log('WebSocket连接正常==',res);
this.send(JSON.stringify({"type": "ping_interval22"}));
this.isOpen = true;
// 连接成功后启动心跳和消息监听
this.startHeartbeat();