How many ports can a process use or bind at the same time?

How many OS ports can one process run at the same time? Is there a limit? I am asking this from a java context ServerSocket

. In my case, this is a simulation app where I created over 4 socket lists for java servers, for 4 different ports, to simulate 4 devices that will do the same. This is why I am wondering if there are any OS limitations (I am using Windows 7, 32 bit)?

+3


source to share


1 answer


Between 1024 - 49152 , but the upper limit may differ depending on the OS.

Ports 0-1023 are reserved by the Internet Engineering Task Force for assigned names and numbers. These are so-called well-known ports and should be used by application endpoints that communicate over TCP / UDP.



Dynamic ports from 49152 to 65535 are reserved for outbound requests.

However, it is strange that you expose the server to so many ports. It would be inconvenient for clients of such a Server to monitor the available ports 48129.

+1


source







All Articles