Same port number | Sololearn: Learn to code for FREE!


Same port number

Can two different processes in the same host have the same port number?

4/18/2021 12:56:01 PM


6 Answers

New Answer


Port is unique you can't use the same port twice on the same time


This will make problems when the second process will want to use the same port at the same time.


The whole point of a port number is to uniquely identify each process within a host. Just like your host (computer) is uniquely identified by an IP address on the internet. Would like someone else to have the same IP address at the same time as yours? I hope not. Similarly, you wouldn't want same port numbers for two processes at the same time as well.


i am agree with you for TCP but what about UDP?


ty guys i appreciate it very much also i found something here is the article :