How many socket's connections a server could hold? I explain: I'm programming a simple chat system in java, and i create everytime a client connect to the server, a socket and a ServerClient object that know the socket of the specific client, like this:
Socket socket= socketServer.accept();
clients.add(new Client(socket));
when the client disconnect to the server i delete the object. I'm thinking if i have one milion client connected to the server in this moment it's a problem, there's other way to do this or it's the correct way? Thanks for the help