Handling multiple connections on a single web server (std::async/select/poll/iocp)

22 hours ago 1
ARTICLE AD BOX

I am currently working on a hobby winsock project and I thought I wanted it to be able to handle multiple connections/request at once and serving them individually.
Through asynchronous apis there are a few ways I can go along with this. There's the C++ std library function std::async and on windows there are WsaAsyncSelect, WSAPoll, IOCP. But as a hobbyist and a beginner I had a few questions regarding these.

Despite all of them handling asynchronous IO. What exactly are they (under the hood) and what's the difference between them/how do they handle their tasks differently. For general scenarios, what are the advantages and disadvantages of using one over the others, what do I need to keep in mind when I try to choose between them. For my specific case of the web server, which one would be the most practical(best practice)/most efficient on resources one to use and why. Where would all of these be use in real world scenarios.

(Note: I am grouping select/poll/IOCP against the standard C++ functions like eg std::async but if there are major differences between the functions and apis in the same group please do mention)

Also yes, I did look at asio.

Read Entire Article