Maintaining many socket connections with a single thread

Posted by John on Stack Overflow See other posts from Stack Overflow or by John
Published on 2009-11-18T08:43:19Z Indexed on 2010/12/24 5:54 UTC
Read the original article Hit count: 149

Filed under:
|

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?

© Stack Overflow or respective owner

Related posts about sockets

Related posts about tcpip