java chat sending users list from server to clients and update it
问题 I write client-server chat using sockets. Help me please understand how send the list of current registered users from server to clients and update it when list changed. I read this similar post but steel don't understand how to do it. I used BufferedReader and PrintWriter streams for sending and receiving messages. And I don't want sending the list of the users any time when clients send messages. I keep list of users in a map as a key set on the server side. public class Server{ private