Files
TTSTDRemoteService/app/src/main/java/com/ttstd/remoteservice/config/WebSocketConfig.java
2026-06-23 10:38:41 +08:00

21 lines
940 B
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package com.ttstd.remoteservice.config;
/**
* WebSocket 配置类
* 用于配置WebSocket连接的各种参数
*/
public class WebSocketConfig {
public String wsUrl; // WebSocket服务器地址
public static final long heartbeatInterval = 30000; // 心跳间隔默认10秒
public static final long reconnectInterval = 5000; // 重连间隔默认5秒
public static final int maxReconnectAttempts = 5; // 最大重连次数
public static final boolean autoReconnect = true; // 是否自动重连
public static final boolean needHeartbeat = true; // 是否需要心跳检测
public static final long connectTimeout = 10; // 连接超时时间(秒)
public static final long readTimeout = 10; // 读取超时时间(秒)
public static final long writeTimeout = 10; // 写入超时时间(秒)
public static final long pingInterval = 10;
}