File tree 1 file changed +1
-17
lines changed
libraries/ESP8266WiFi/src
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) {
333
333
return _write ((const uint8_t *)buf, size, true );
334
334
}
335
335
336
- // We have to manually read and send individual chunks.
337
336
size_t WiFiClientSecureCtx::write (Stream& stream) {
338
- size_t totalSent = 0 ;
339
- size_t countRead;
340
- size_t countSent;
341
-
342
337
if (!connected () || !_handshake_done) {
343
338
DEBUG_BSSL (" write: Connect/handshake not completed yet\n " );
344
339
return 0 ;
345
340
}
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 );
358
342
}
359
343
360
344
int WiFiClientSecureCtx::read (uint8_t *buf, size_t size) {
You can’t perform that action at this time.
0 commit comments