更新时间:2023-11-17 23:00:28
您需要维护服务器端会话.例如,您可以维护一个HashMap.因此,当那时有任何新用户登录时,您需要在该Map中进行输入.而且,只要您需要所有已登录用户的信息,就可以轻松获取.
You need to maintain a server side session. For example, you can maintain a HashMap. So, when any new user logged in at that time you need to do entry in that Map. And whenever you need all logged in user's information, you can get it easily.