0

I have tested the function select() on Windows, and found that the param fd_set which is used in select() outputed with the satisfying sockets. So does select() on Windows play a similar role as epoll() on Linux?

How I tested it is by debugging, finding that the front elements is changed by system and all of them are the satisfying ones.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
  • 2
    *"How I tested it is by debuging,"* - it might be more useful to read [the documentation](https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-select) instead of figuring out what it does by debugging. Apart from that select on Windows matches the functionality of select on Linux (and other UNIX systems or systems supporting Berkeley sockets). epoll provides similar functionality, but more efficient - see [select vs epoll](https://www.google.com/search?q=select+vs+epoll) for more. – Steffen Ullrich Nov 27 '21 at 15:32
  • Oh, I get it. Thank you very much. – code-whitezyj Nov 27 '21 at 15:35
  • Does this answer your question? [What are the differences between poll and select?](https://stackoverflow.com/questions/970979/what-are-the-differences-between-poll-and-select) – SuperStormer Dec 03 '21 at 04:28

0 Answers0