Inconsitent meaning of WiFiUDP::flush() across cores.
- Dominant language
- C++
- Stars
- 16.7k
- Forks
- 13.1k
- PR merge metrics
- No merged PRs in 30d
Description
AFAICS ESP8266 is the only Arduino platform where `WiFiUDP::flush()` behaves like what one expects on a POSIX system. Meaning sending/writing any pending data. But Arduino chose to use it as a means to **discard** buffers. And that's how it is implemented on most (all?) cores AND stated in the documentation. https://github.com/esp8266/Arduino/blob/master/cores/esp8266/Udp.h#L79
On ESP8266 `WiFiUDP::flush()` just calls `endPacket()` which is not really useful, while a function to drain the receive buffer **IS**. At least IMHO.
I propose to change the flush() method according to the Arduino _standard_.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.