Click here to Skip to main content
15,936,850 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi. I want to find free ports nr for assigning to me udp and tcp clients. I want to do this with code.
Question: what namespace, class has this ability? Do you have a code sample?
Best regards Per

What do you mean free ports? Basically system calls which establish connection do this work.
Share this answer
I mean. ports can be occupied by other proceses. if you hardcode a port, lets say 8000 it maybe already invoked by an other process. so a´m looking for available ports.
Share this answer
Nyarost 20-Aug-10 7:50am    
You need this ports for listening on them?
Sandeep Mewara 20-Aug-10 14:02pm    
Use 'Add comment' feature to respond to an answer from next time.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900