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

Stream::Send fixes: doc + StreamConstPtr byte-by-byte + missing SSL availableForWrite (#7935)

* StreamConstPtr: fix doc + reading flash space byte-by-byte
* add missing availableForWrite wrapper in wificlient-ssl
* WiFiClientSecure-ctx: add missing availableForWrite()
This commit is contained in:
david gauchard
2021-03-25 16:00:41 +01:00
committed by GitHub
parent 0a4fcdf090
commit c1118dfce3
4 changed files with 30 additions and 4 deletions

View File

@ -179,12 +179,14 @@ public:
virtual int read() override
{
return _peekPointer < _size ? _buffer[_peekPointer++] : -1;
// valid with dram, iram and flash
return _peekPointer < _size ? pgm_read_byte(&_buffer[_peekPointer++]) : -1;
}
virtual int peek() override
{
return _peekPointer < _size ? _buffer[_peekPointer] : -1;
// valid with dram, iram and flash
return _peekPointer < _size ? pgm_read_byte(&_buffer[_peekPointer]) : -1;
}
virtual size_t readBytes(char* buffer, size_t len) override