Reputation: 65
I'm working with sockets. I'd like to know how many people can connect to my SocketServer using Sockets?
According to Cameron it is 2^16 different connection. So, as much as 2^16 people can actually use my chat at the same time(resources for handling so much users and other factors are not considered)???
https://www.quora.com/How-many-connections-can-a-JAVA-socket-server-hold
Upvotes: 3
Views: 1582
Reputation: 718708
The theoretical limit is 2^16 - 1. Port zero is reserved.
The practical limit will be platform specific, and can only be determined by testing.
The limiting factors will include:
Most of those are most likely to be hardware limitations.
The limit of 50 that people are talking above in comments is the number of connection requests that can be queued. If your java application calls ServerSocket.accept()
fast enough, requests won't be dropped.
Upvotes: 4
Reputation: 9058
On Mac and Linux, you can do "ulimit", which will tell you the limit defined by the operating system.
Upvotes: 0