File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed
libraries/ESP8266WiFi/src Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -333,28 +333,12 @@ size_t WiFiClientSecureCtx::write_P(PGM_P buf, size_t size) {
333333 return _write ((const uint8_t *)buf, size, true );
334334}
335335
336- // We have to manually read and send individual chunks.
337336size_t WiFiClientSecureCtx::write (Stream& stream) {
338- size_t totalSent = 0 ;
339- size_t countRead;
340- size_t countSent;
341-
342337 if (!connected () || !_handshake_done) {
343338 DEBUG_BSSL (" write: Connect/handshake not completed yet\n " );
344339 return 0 ;
345340 }
346-
347- do {
348- uint8_t temp[256 ]; // Temporary chunk size same as ClientContext
349- countSent = 0 ;
350- countRead = stream.readBytes (temp, sizeof (temp));
351- if (countRead) {
352- countSent = _write ((const uint8_t *)temp, countRead, true );
353- totalSent += countSent;
354- }
355- yield (); // Feed the WDT
356- } while ((countSent == countRead) && (countSent > 0 ));
357- return totalSent;
341+ return stream.sendAll (this );
358342}
359343
360344int WiFiClientSecureCtx::read (uint8_t *buf, size_t size) {
You can’t perform that action at this time.
0 commit comments