If you are already using Asynchrnous pattern then you 0-1 Thread only, You can make it equal to 0 using BeginAccept or create a Thread and listen Incoming conneciton Requests in it using listener.AcceptTcpClient() or AcceptSocket();
You dont need Threads to Send or Receive Data, Just use Asynchronous Methods on Socket, BeginReceive EndReceive or on NetworkStream, BeginRead, End Read, All clients can be well serviced without needng Threding at all and it'll be manged by OS itself.
Have you started some work If so, Show your code and ask for what prblem you are facing!
Best Regards,
|