I am reading a book about network progamming in C. It is from 2004. In the example code, author is using select C function to accept multiple connections from the client. Is that function deprecated today?
I see that there are different ways to accept multiplexed I/O like poll and epoll. What are the advantages?
It's not deprecated, and lots of programs rely on it.
It's just not the best tool as it has some limitations:
select
manipulates it.Feel free to use it if these aren't relevant for you. Otherwise use poll
/libevent if you're looking for a cross-platform solution, or in some rare-cases epoll
/kqueue
for platform specific optimized solutions.