private static Socket[] getSockets(){
        Socket[] res = new Socket[userList.size()];
        for (int i = 0; i < userList.size(); i++){
            res[i] = userList.get(i).getSocket();
        }
        return res;
    }