1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-14 13:41:23 +03:00

WifiClient::write refactoring (second attempt) (#2177)

* WiFiClient: use DataSource for writes

* ESP8266WebServer: delegate writing to WiFiClient

* ESP8266WebServer: set write timeout before sending content
This commit is contained in:
Ivan Grokhotkov
2016-06-23 17:47:18 +08:00
committed by GitHub
parent 5e3df08273
commit 8db4dcea42
7 changed files with 565 additions and 415 deletions

View File

@ -557,7 +557,8 @@ extern "C" int ax_port_write(int fd, uint8_t* buffer, size_t count) {
errno = EIO;
return -1;
}
size_t cb = _client->write((const char*) buffer, count);
size_t cb = _client->write(buffer, count);
if (cb != count) {
errno = EAGAIN;
}