1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

add function peekBytes to WiFiClient/WiFiClientSecure to allow to peek multiple bytes if possible

This commit is contained in:
Markus Sattler
2015-12-19 14:37:36 +01:00
parent 898737422e
commit 5333ebfed7
5 changed files with 72 additions and 0 deletions

View File

@ -56,6 +56,10 @@ public:
virtual int read();
virtual int read(uint8_t *buf, size_t size);
virtual int peek();
virtual size_t peekBytes(uint8_t *buffer, size_t length);
size_t peekBytes(char *buffer, size_t length) {
return peekBytes((uint8_t *) buffer, length);
}
virtual void flush();
virtual void stop();
virtual uint8_t connected();