Reputation: 2773
In the servers port is of unsigned 16 bit so its range is 0>= to <=65535.
When i am trying to give 0 to 9 port number server starts but on browser it's unable to listen?
Are single digit port reserved for something?
Upvotes: 0
Views: 143
Reputation: 18530
In many operating systems, ports below 1024 are restricted to privileged processes. On virtually all UNIX-like systems (Linux, BSD, ...) a process needs to run as root
to be able to bind to ports 0 through 1023.
Ports in this range are also reserved in the sense that typically no new assignments are made (in IANA's official registry of what each port is used for).
More information: https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers#Well-known_ports
Upvotes: 4