Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion libraries/Network/src/NetworkClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions libraries/Network/src/NetworkClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class NetworkClient : public ESPLwIPClient {
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();
Expand Down
4 changes: 3 additions & 1 deletion libraries/Network/src/NetworkUdp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions libraries/Network/src/NetworkUdp.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class NetworkUDP : public UDP {
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();
Expand Down
Loading