Let me give some background as to what I'm asking, to make it clear:
In the context of Server-Client TCP-communication over the internet, when a server process is running, a client process can initiate a TCP connection to the server. It does so by initiating a three-way-handshake.
At the end of the hand shaking phase, the accept()
function (invoked on the welcoming socket at the server side) will set up a new socket - a connection socket - dedicated for the new incoming client-connection.
From now on, until this connection will be terminated, the server will communicate with the client through the connection socket.
Since every client gets a connection socket, and TCP-socket on the server is uniquely identified by a four-tuple (src IP address, src port number, dest IP address, dest port number), and a port number is a 16-bit number, then how can servers support more than 65,536 clients (well, 65,536 minus the reserved ones)?