Mio
When working with non-blocking sockets, we need a way to check whether the socket is ready for the desired operation. The situation is worse when we have thousands, or more, sockets to manage. We can use the very inefficient way of running a loop, checking for the socket state, and performing the operation once it's ready. But there are better ways to do this. In Unix, we had the poll system call, to which you give the list of file descriptors you want to be monitored for events. It was then replaced by the select system call, which improved things a bit. However, both select and poll were not scalable as they were basically for loops under the hood and the iteration time went up linearly as more and more sockets were added to its monitor ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access