mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-12 01:53:07 +03:00
fixes for WiFiClient::write(Stream) (#7987)
fixes for WiFiClient::write(Stream) and Stream transfers - remove deprecated WiFiClient::write(Stream,size) - fix and deprecate WiFiClient::write(Stream) to use Stream::sendAll instead of ::sendAvailable - update ESP8266WebServer::streamFile to use file.sendAll(client) instead of client.write(file) - remove stream dependence in ClientContext - Stream::send(): honor timeout in all case, avoid short transfer when output is temporarily full - example WiFiEcho: show sendAll and sendAvailable
This commit is contained in:
@ -226,7 +226,7 @@ public:
|
||||
size_t contentLength = 0;
|
||||
_streamFileCore(file.size(), file.name(), contentType);
|
||||
if (requestMethod == HTTP_GET) {
|
||||
contentLength = _currentClient.write(file);
|
||||
contentLength = file.sendAll(_currentClient);
|
||||
}
|
||||
return contentLength;
|
||||
}
|
||||
|
Reference in New Issue
Block a user