polling icon indicating copy to clipboard operation
polling copied to clipboard

Add file handle support for overlapped I/O

Open klu-dev opened this issue 4 months ago • 3 comments

Closes https://github.com/smol-rs/polling/issues/97

This is an implementation to support Windows file handle overlapped I/O. The basic idea is:

  1. Add an File struct in PacketInner. The File struct have read and write OVERLAPPED struct. The read and write struct address will exposed to callers. The caller use read and write overlapped pointer as parameter for ReadFile/WriteFile operation.
  2. IOCP completion events receive read and write address which will be converted back to Packet for updating events
  3. New PollerIocpFileExt trait which has add_file and remove_file API to extend file functionality.

klu-dev avatar Aug 17 '25 08:08 klu-dev