What is the fastest / most scalable way to implement a server
(using a Socket) which can handle large numbers of incoming
connections? Like, at least 10K, but probably up to 1 million
connections.
More specifically:
1) How do I efficiently select the connections (client Socket
instances) which have data which is ready to read?
2) How do I efficiently select the connection that are ready to
accept data sent to them?
(which are write ready - in other words) ?
I read in the D Cookbook that using the SocketSet is not the
fastest way to do this, as it has to iterate through all Socket
instances in it, and check a flag on each Socket.