package com.lovecoding.websocket;

import javax.websocket.Session;
import java.util.concurrent.ConcurrentHashMap;

public class GameTools {

    private static ConcurrentHashMap<String, Session> user = new ConcurrentHashMap<>();

    public static void add( Session session ){
        user.put( session.getId(), session );
    }

    public static void del( Session session ) {
        user.remove( session.getId() );
    }

    public static ConcurrentHashMap<String, Session> get(){
        return user;
    }

}
