mirror of
https://github.com/siemens-mobile-hacks/node-serialport-bindings-cpp.git
synced 2026-11-25 18:37:19 +00:00
Instead of ReadFile and WriteFile, which block and transfer data synchronously, use ReadFileEx and WriteFileEx, which both allow async callbacks. In addition, change how timeouts are used for ReadFile*, using an unlimited timeout for the first byte, and no timeout for the rest of the data in the input buffer. This removes the need to poll entirely, while still retrieving all data available in the input buffer. In both cases, the I/O operations happen in their own threads, since Windows requires IOCompletion callbacks to wait for their calling thread to be in an "alertable wait state". Fixes #1221 |
||
|---|---|---|
| .. | ||
| darwin_list.cpp | ||
| darwin_list.h | ||
| poller.cpp | ||
| poller.h | ||
| serialport.cpp | ||
| serialport.h | ||
| serialport_unix.cpp | ||
| serialport_unix.h | ||
| serialport_win.cpp | ||
| serialport_win.h | ||