Question

I've created a project using socket programming. If I connect a single client to my server, the data I send from my client is successfully received by the server. But whenever I connect more than one client, only one client's data is received by the server. The other clients fail to connect. How can I make the server accept all new incoming connections, and how can I make the server receive two files from the same client?

Was it helpful?

Solution

If your code uses BeginAccept, EndAccept methods to accept new connection asynchonously, don't forget to call again BeginAccept after EndAccept call in your AcceptCallback.

Regards

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top