1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-18 23:03:34 +03:00

comments on Arduino flush() method (#8318)

This commit is contained in:
david gauchard
2021-09-29 15:22:30 +02:00
committed by GitHub
parent 93b7325cb8
commit 9d024d17fd
4 changed files with 7 additions and 4 deletions

View File

@ -72,7 +72,7 @@ public:
size_t peekBytes(char *buffer, size_t length) {
return peekBytes((uint8_t *) buffer, length);
}
virtual void flush() override { (void)flush(0); }
virtual void flush() override { (void)flush(0); } // wait for all outgoing characters to be sent, output buffer should be empty after this call
virtual void stop() override { (void)stop(0); }
bool flush(unsigned int maxWaitMs);
bool stop(unsigned int maxWaitMs);

View File

@ -92,7 +92,7 @@ public:
int read(char* buffer, size_t len) override { return read((unsigned char*)buffer, len); };
// Return the next byte from the current packet without moving on to the next byte
int peek() override;
void flush() override; // Finish reading the current packet
void flush() override; // wait for all outgoing characters to be sent, output buffer is empty after this call
// Return the IP address of the host who sent the current incoming packet
IPAddress remoteIP() override;