LiuHao
2024-03-18 65c51124f88e8563235a963d74f22531d4deb89c
ruoyi-common/ruoyi-common-websocket/src/main/java/org/dromara/common/websocket/holder/WebSocketSessionHolder.java
@@ -5,6 +5,7 @@
import org.springframework.web.socket.WebSocketSession;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
/**
@@ -31,6 +32,10 @@
        return USER_SESSION_MAP.get(sessionKey);
    }
    public static Set<Long> getSessionsAll() {
        return USER_SESSION_MAP.keySet();
    }
    public static Boolean existSession(Long sessionKey) {
        return USER_SESSION_MAP.containsKey(sessionKey);
    }