Does Windows have any equivalent of multiplexed I / O (epoll / kqueue) from the Linux world? I ask based on the fact that allocating a buffer to inactive sockets when using IOCP is not always effective
1 answer
Select with all the consequences, WSAPoll or Event Objects , starting with Vista.
libev, for example, uses select.
WSAPoll is designed to work like a poll and can be used as a drop-in-place replacement, something like this:
#if defined (WIN32) static inline int poll( struct pollfd *pfd, int nfds, int timeout) { return WSAPoll ( pfd, nfds, timeout ); } #endif Event Objects, judging by the notes that I have, does not scale much, can catch 64 events at a time. But did not dig in more detail.
Interesting reading to read:
|