serial-rs
                                
                                 serial-rs copied to clipboard
                                
                                    serial-rs copied to clipboard
                            
                            
                            
                        set COMMTIMEOUTS for POSIX-like read timeout behavior on Windows
The current read timeout behavior implemented by serial-windows differs significantly from the read timeouts of serial-unix. On Windows, read calls do not return immediately when bytes are/become available, but instead wait for the timeout to expire. In contrast, on Linux (tested, but should be true for all POSIX systems) read calls return as soon as bytes are available. Particularly for interactive implementations, the Windows behavior is suboptimal.
This pull request implements the POSIX-behavior on Windows by setting up COMMTIMEOUTS accordingly (see Windows API documentation).
@carstenandrich Thanks. The Windows implementation is intended to behave the same as the POSIX implementation. I'll need to find some time to setup a Windows VM to reproduce and verify the fix. If everything checks out, I can merge this.
Any updates on this?