Is this a restriction of the software you are using? Because in general that is not a true statement. You will notice for example that hundreds of clients can connect to your web server simultaneously, all using port 80.
Because at a one time only one client can use one port another can not use the same port.
And please, when doing so, use real words.
think your refereeing to my spelling mistakes
Of course it takes time. Everything takes time. If we didn't do things that took time, we wouldn't have any programs. The question is, does it take too much time? I doubt it. You're trying to optimize something that you don't know needs optimizing.
If I keep going finding free ports one by one it takes time. So is there any other way to do this
If there�s 3 machines(PC�s), one is a server. PC A is connecting to server in port 5000. If PC B is also connecting to server by port 5000 it gives an error( hope this happens to every one) so PC B cant use port 5000.