whyclxw
2025-01-21 c085c15ce13110af5976cee641573be34be2d1ca
首页homesocket推送
1个文件已修改
12 ■■■■ 已修改文件
src/main/java/com/whyc/webSocket/HomeSocket.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/whyc/webSocket/HomeSocket.java
@@ -45,12 +45,12 @@
    @OnOpen
    public void onOpen(Session session, EndpointConfig config) {
        this.session = session;
        //HttpSession httpSession = (HttpSession) config.getUserProperties().get("httpSession");
        //UserInf user = (UserInf) httpSession.getAttribute("user");
        //final int userId = user.getUid();
        //final int urole = user.getUrole();
        final int userId = 10001;
        final int urole = 1;
        HttpSession httpSession = (HttpSession) config.getUserProperties().get("httpSession");
        UserInf user = (UserInf) httpSession.getAttribute("user");
        final int userId = user.getUid();
        final int urole = user.getUrole();
        /*final int userId = 10001;
        final int urole = 1;*/
        Thread thread = new Thread("Thread_HomeSocket") {
            @Override
            public void run() {