Maintaining many socket connections with a single thread
- by John
Many tutorials on socket communication I see seem to use 1 thread per socket. But on a server used for online gaming, you might have 10k concurrent users - 10k threads isn't probably a wonderful idea.
I came across a tool (SmartFox) which claims to use a single thread for monitoring all socket connections, potentially thousands of them. This app happens to be in Java, but I figure C++ or C# could do the same... how would you achieve this?