4 ms·
It's definitely worth reading, but be aware that it's quite old-fashioned in that it focuses entirely on blocking I/O and select(). Also this page fails to expl
by TorKlingberg 9y ago
It's definitely worth reading, but be aware that it's quite old-fashioned in that it focuses entirely on blocking I/O and select(). Also this page fails to explain why you would call shutdown(): http://beej.us/guide/bgnet/output/html/multipage/shutdownman.html http://beej.us/guide/bgnet/output/html/multipage/shutdownman...
- da02 9y agoThanks for pointing this out.
- nix0n 9y agoWhat has replaced select()?
- elromulous 9y agoepoll on linux. Other apis on other oses. More reading: http://www.kegel.com/c10k.html http://www.kegel.com/c10k.html
- fish_fan 9y agoKqueue on the bsds and darwin.
- jandrese 9y agoAlthough there is a case for still using select(). If you're looking at avoiding porting headaches and aren't dealing with a large number of descriptors then select() still works fine. The alternatives are mostly necessary when you're dealing with large numbers of connections (thousands), which most people aren't. Of course there's also the slight problem that select()'s interface with the file descriptor packing macros and the unusual requirement to figure out which file descriptor is the largest numerically that might push people to the alternatives. That is also a valid reason IMHO.
- dgoodell 9y agoDo you perhaps have some examples of some more modern resources or examples we can consult? I would appreciate it.