In order to learn better regards between protocols TCP/IP and Socket, I solved make a simple web chat (desktop). I need to knows how many users are connected to socket, so I thought in store objects sockets in a ArrayList<Socket> in then return object socket for RMI. That's the better idea to that ? Other issue: How do I send the message to particular socket connected ?
Can someone me give advice ? Thank you!