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

flush() semantics have changed #469

m-mcgowan opened this issue Jun 28, 2015 · 1 comment


Copy link

commented Jun 28, 2015

At present, the flush() semantics discards any unread data. This was the behavior in very old versions of Arduino. Now, flush() is a virtual method on the Stream class with different semantics:

Calling flush() should block the caller until all the data has been sent. No data is discarded.

Classes affected:

  • Serial
  • UDP
  • TCPClient

To emulate the older behavior and discard unread data, clients can simply call read() in a loop until there is no more data to read.

@m-mcgowan m-mcgowan added this to the 0.4.10 milestone Jan 29, 2016


This comment has been minimized.

Copy link
Contributor Author

commented Mar 14, 2016

@avtolstoy - could you take a look at this please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.