package com.njcn.gather.detection.util.socket.websocket;

/**
 * WebSocket常量管理类
 * 
 * @author wr
 * @date 2024/12/10
 */
public final class WebSocketConstants {
    
    /**
     * URL参数分隔符
     */
    public static final String QUESTION_MARK = "?";
    
    /**
     * URL参数等号分隔符
     */
    public static final String EQUAL_TO = "=";
    
    /**
     * 客户端心跳消息
     */
    public static final String HEARTBEAT_PING = "alive";
    
    /**
     * 服务端心跳响应
     */
    public static final String HEARTBEAT_PONG = "over";
    
    /**
     * 心跳超时最大次数
     */
    public static final int MAX_HEARTBEAT_MISS_COUNT = 3;
    
    /**
     * WebSocket握手失败状态码
     */
    public static final int HANDSHAKE_FAILED_STATUS = 4000;
    
    /**
     * WebSocket握手失败原因
     */
    public static final String HANDSHAKE_FAILED_REASON = "Missing required userId parameter";
    
    private WebSocketConstants() {
        // 私有构造函数，防止实例化
    }
}