package com.ltgk.boat.config.websocket;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.WebSocketSession;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @Author: wan kun
 * @Description: websocket map bean
 * @Date: 2024/12/5 17:15
 * @Version: 1.0
 */
@Configuration
public class WebSocketSessionMap {
    @Bean
    public Map<String, WebSocketSession> sharedMap() {
        return new ConcurrentHashMap<>();
    }
}
