smol-rs / polling

Portable interface to epoll, kqueue, event ports, and wepoll
Apache License 2.0
532 stars 65 forks source link

Use ProcessSocketNotifications on Windows? #208

Open Berrysoft opened 3 months ago

Berrysoft commented 3 months ago

ProcessSocketNotifications is a new Windows API after 21H1. It performs much like epoll and kqueue, and provides edge trigger.

I would like to implememt it, together with #141. I think it will almost be a total rewrite of current IOCP impl. Would you like this idea?

Ref: https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-processsocketnotifications

notgull commented 3 months ago

I will accept a PR for this, since it looks like it can be implemented on top of the current impl. However since we still support Rust 1.63 and therefore Windows 7/10, we should keep around the old impl.