wjwwood / serial

Cross-platform, Serial Port library written in C++
http://wjwwood.github.com/serial/
MIT License
2.13k stars 1.04k forks source link

Implement flushInput and flushOutput for windows #153

Closed bmoyer closed 6 years ago

bmoyer commented 7 years ago

This relates to issue #148.

This PR implements flushInput and flushOutput for Windows. The behavior is the same as their Unix counterparts, in that:

-flushOutput clears the contents of an output buffer without transmitting the deleted characters (as opposed to flush, which clears the contents of the output buffer and transmits the deleted characters). -flushInput clears the contents of the input buffer.

Refer to MSDN for more details.