Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tcdrain or tcflush for flushing #99

Open
zii-dmg opened this issue Nov 12, 2019 · 0 comments
Open

tcdrain or tcflush for flushing #99

zii-dmg opened this issue Nov 12, 2019 · 0 comments

Comments

@zii-dmg
Copy link

zii-dmg commented Nov 12, 2019

In this dotnet/corefx@45dba6e#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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants