Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello...
I am trying to create a program where server can listen to one port and on some event occurrence it will stop listening that port and start listening other port and after listening the other port it should resume the previous port.
Please help me with this.

What I have tried:

I know one way to do is using thread but how??
Posted
Updated 18-Feb-18 20:30pm

1 solution

Ofcourse threading is the solution. You must write some functions which can listen to different port and start them as different thread.

Did you already think about searching some tutorial on threads or a good video tutorial?
 
Share this answer
 
Comments
CPallini 19-Feb-18 3:02am    
5.
Member 13684712 19-Feb-18 5:31am    
@KarstenK Thank you for your reply and time. Can you please elaborate it a little bit more?

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