-
Notifications
You must be signed in to change notification settings - Fork 13.3k
flush() is a TX related function #4018
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
Comments
Closing as duplicate of #1002 . |
@JAndrassy (from #3967)
The ::flush() beeing a tx not rx stuff was #1002's point and fix is merged. So you were suggesting for moving it to Print:: ? |
flush() accompanies write functions in Print. so yes it should be in Print. Stream adds read functions. flush() is important for effective implementations of write() with buffering. btw: most Arduino users (programmers) do not use flush(). Therefore in my implementations of Print (mostly derived from Stream or Client) I add flush into available() if rx buffer is empty and tx buffer is not sent. It is much better the sending by one byte over some protocol with frame bytes overhead. |
Since current implementation does not exactly follows arduino's core library, this is a fair proposal. |
no, because it would take to much time for me to fork the project and set it up for testing |
…al Print::flush() re fix esp8266#4018
I hope you'll have time to try #4029 |
WiFiClient.flush should send all data from tx buffer. it is not true that in Arduino world it is a rx buffer thing. the Client class is inherited from Print class and the flush method is from Print. And in Print implementations the flush is a tx thing. And the reference for the Client class implementation is Ethernet library.
The text was updated successfully, but these errors were encountered: