server on wins
Im working on a huge server on windows and im not sure what approach for multiclients should I use.. I know multithreading is not good, so I've been using non-blocking sockets until now (1 thread), which has limitation but this can be easily changed..
I wondered what do you guys think about IOCP framework on windows? It runs more threads to handle all connections, not one for each.. Is it better than select() method using nonblocking sockets? If not, why so?
Thanks for answers
Personally, I don't see what's the big idea to use Threads, just keep them under control.
Now, non-blocking sockets are the real bad idea, select() should have been your first option.
You should be able to create a server that will be able to talk to multiple users using select(), depends what do you want the server to send and receive.
Never the less, if you're planning on making a Windows application, you WILL block the windows main loop, and by that make the window act as if it's no responding, there isn't much you can do you to avoid multi-threading, at the very least, you will have to use one thread for the windows loop and the other for the server itself.