mirror of
https://github.com/espressif/arduino-esp32
synced 2024-09-21 02:18:29 +00:00
fix(client): Make flush() call clear() and deprecate it (#10242)
This is a compromise for issues caused by https://github.com/espressif/arduino-esp32/pull/9453
This commit is contained in:
parent
df4518d6a1
commit
7633653019
@ -369,7 +369,9 @@ int NetworkClient::read() {
|
||||
return data;
|
||||
}
|
||||
|
||||
void NetworkClient::flush() {}
|
||||
void NetworkClient::flush() {
|
||||
clear();
|
||||
}
|
||||
|
||||
size_t NetworkClient::write(const uint8_t *buf, size_t size) {
|
||||
int res = 0;
|
||||
|
@ -56,6 +56,7 @@ public:
|
||||
size_t write(const uint8_t *buf, size_t size);
|
||||
size_t write_P(PGM_P buf, size_t size);
|
||||
size_t write(Stream &stream);
|
||||
[[deprecated("Use clear() instead.")]]
|
||||
void flush(); // Print::flush tx
|
||||
int available();
|
||||
int read();
|
||||
|
@ -288,7 +288,9 @@ size_t NetworkUDP::write(const uint8_t *buffer, size_t size) {
|
||||
return i;
|
||||
}
|
||||
|
||||
void NetworkUDP::flush() {}
|
||||
void NetworkUDP::flush() {
|
||||
clear();
|
||||
}
|
||||
|
||||
int NetworkUDP::parsePacket() {
|
||||
if (rx_buffer) {
|
||||
|
@ -64,6 +64,7 @@ public:
|
||||
int endPacket();
|
||||
size_t write(uint8_t);
|
||||
size_t write(const uint8_t *buffer, size_t size);
|
||||
[[deprecated("Use clear() instead.")]]
|
||||
void flush(); // Print::flush tx
|
||||
int parsePacket();
|
||||
int available();
|
||||
|
Loading…
Reference in New Issue
Block a user