I understand that when a TCP client connects to a server, it automatically uses a unused local port unless specified explicitly. On the server side, we have a listening socket which creates a new socket whenever a new connection is accepted.
But all server sockets use same local port (I checked this with netstat). My question is how does a packet sent from client reaches to a specific socket on server when all server side sockets are communicating over same IP address and local port?
Below is a telnet snapshot showing that my tcp/ip echo server is using same address and port for 2 different connections.