In my own little world were I write small server/client applications, I might only have 5 to 10 clients. I usually create a new thread which handles reading the networkstream or use networkstream.beginread (which I understand basically does the same thing). When the client disconnects or the connection is lost then the thread ends.

Now in the real world the number of clients connected to a server could be hundreds. I dont think my pc could cope with hundreds of threads

So to finally get to the questions, how does the real world handle gettting data from a large quantity of network clients.

I thought about creating a thread to loop through a list of clients and checking to see if data was available. If so creating a thread to read data from that networkstream untill all data was read. once all data was read the thread would end.

Or am I barking mad and up the wrong tree?