Answer the question
In order to leave comments, you need to log in
How to store connections (Socket) of clients and whether it is necessary to do it?
I am writing a messenger, and as I understand it, I need to store each connection (Socket) of the client somewhere on the server (Let's say if the client receives a letter, I will have to somehow find its connection on the server and send a message). I thought to store the Login-Socket value in the Map in order to know where whose connection is. Or is it better to store it somehow differently, or does it not need to be stored at all?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question