This is a Rust crate inspired by the famous wepoll library. It provides similar FFI, but not ABI-compatible.
Previously I tried to add ProcessSocketNotifications backend for polling, but it doesn't fit that crate well.
The crate is no-std by default to reduce the binary size. All APIs are panic-free.
Unlike wepoll, ProcessSocketNotifications is used in this library. It behaves a little different from epoll in Linux.
wepoll2 supports event objects with NtAssociateWaitCompletionPacket API series. No thread pool involved, and one-shot trigger only.
epoll_pwait and epoll_pwait2 is implemented for alertable waiting and timespec support.
ProcessSocketNotificationsis a very new API.- The edge trigger behaves a little different.
- One socket could be only associated to one IOCP.
- Not all
EPOLL*flags are supported.
- Sockets don't work on i686 target. Still investigating.
epoll_waitseries API may wait for a shorter time than specified. Maybe bugs of Windows API.