Assuming your server is running on port 80, here's what's going on under it:
- The server is listening on port 80.
- Client1 connects to server port 80 from its port 12345
- The server accepts the client1 connection request and assigns port 9876 to communicate with client1.
- The server continues to listen on port 80.
So, despite the fact that you think port 80 is not consumed, it is a listener. Your computer probably has 50,000 ports for free, so no problem.
FYI: Ports cannot be shared with other processes. Only Node child processes can be separated, see how it can be: http://nodejs.org/docs/latest/api/cluster.html
source share