RJCP.DLL.SerialPortStream icon indicating copy to clipboard operation
RJCP.DLL.SerialPortStream copied to clipboard

tcdrain or tcflush for flushing

Open zii-dmg opened this issue 6 years ago • 0 comments

In this https://github.com/dotnet/corefx/commit/45dba6ea7a49a9945a5ad497cfc3de2ec1246683#diff-221055955142c33d285c9271ba435005 .NET Core team replaced tcflush with tcdrain. Maybe SerialPortStream should use tcdrain too, because tcflush discards bytes, but Flush() API should send them.

https://linux.die.net/man/3/tcdrain:

  • tcdrain() waits until all output written to the object referred to by fd has been transmitted.
  • tcflush() discards data written to the object referred to by fd but not transmitted, or data received but not read

zii-dmg avatar Nov 12 '19 09:11 zii-dmg