Hi,
On Tue, 26 Nov 2013 at 11:41, Haider Ali wrote:
Can anyone let me know that how XMPP handle so many connections.
Since we know that we can only open 2 ^ 16 = 65536 ports (
connections ) with a single machine. But i came to know that single
xmpp server can handle more connections than 65536.
your assumption that there can only be a single connection per port
number at a time is wrong. A combination of local IP address and port
can be used for many connections at once as long as the remote IP
address *or* the remote port number are different between each of
them.
Server sockets do this automatically with every call to accept(), but
for client sockets you have to set the SO_REUSEADDR option to allow a
second bind() while socket using the same port number is still open.
cu
Reinhard