/*
 * @Author: Z 1518051043@qq.com
 * @Date: 2025-12-01 13:52:20
 * @LastEditors: zwy 1518051043@qq.com
 * @LastEditTime: 2026-01-21 13:08:28
 * @FilePath: \yuanxinPro\src\utils\requestSocekt.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import HeartbeatInterval from '@/store/module/app.js'
// const apiUrl = `ws://121.229.107.155:19021/trackInfo`
const apiUrl = `ws://121.229.107.155:19021/TestTimeSend`
const wss = new WebSocket(apiUrl);

// wss.onclose = () => {
//   clearInterval(HeartbeatInterval);
//   //console.log('主星级WebSocket正在重新连接, attempting reconnect...');
//   setTimeout(() => {
//     // 自动重连逻辑
//    wss =  new WebSocket(apiUrl);
//     //console.log('主星级WebSocket...',wss);
//   }, 1000);
// };

export default wss;
