Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I have just recently learnt how to do socket programming in C#. I know how to do both synchronous and asynchronous sockets. Problem is I'm not sure how to accept multiple clients. There is code in the constructor of my main program to start listening on a specified port. Once a client connects to that port, the socket now handles that client only. Right?
I should create an event that creates a new socket every time the listening one gets connected to a client. And another event when a client disconnects.Right?
Any advice on how to implement this? Or any links to resources that I should read?
Thanks in advance.
0 · ·