Skip to content

Inconsitent meaning of WiFiUDP::flush() across cores. #8312

Open
@everslick

Description

@everslick

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions