mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-07 16:23:38 +03:00
Revert "Add WiFiClient.write for Stream"
This reverts commit fa24d770c5096ad7a8894c3e5221c1358efe128c.
This commit is contained in:
parent
2f45612bb8
commit
74a2b75cf9
@ -138,34 +138,6 @@ size_t ICACHE_FLASH_ATTR WiFiClient::write(const uint8_t *buf, size_t size)
|
|||||||
return _client->write(reinterpret_cast<const char*>(buf), size);
|
return _client->write(reinterpret_cast<const char*>(buf), size);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t ICACHE_FLASH_ATTR WiFiClient::write(Stream &src)
|
|
||||||
{
|
|
||||||
uint8_t obuf[1460];
|
|
||||||
size_t doneLen = 0;
|
|
||||||
size_t sentLen;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
while (src.available() > 1460)
|
|
||||||
{
|
|
||||||
for(i=0;i<1460;i++) obuf[i] = src.read();
|
|
||||||
sentLen = write(obuf, 1460);
|
|
||||||
doneLen = doneLen + sentLen;
|
|
||||||
if(sentLen != 1460){
|
|
||||||
DEBUGV("Sent: %u < 1460\r\n", sentLen);
|
|
||||||
return doneLen;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
uint16_t leftLen = src.available();
|
|
||||||
for(i=0;i<leftLen;i++) obuf[i] = src.read();
|
|
||||||
sentLen = write(obuf, leftLen);
|
|
||||||
doneLen = doneLen + sentLen;
|
|
||||||
if(sentLen != leftLen){
|
|
||||||
DEBUGV("Sent: %u < %u\r\n", sentLen, leftLen);
|
|
||||||
}
|
|
||||||
return doneLen;
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" uint32_t esp_micros_at_task_start();
|
extern "C" uint32_t esp_micros_at_task_start();
|
||||||
|
|
||||||
int ICACHE_FLASH_ATTR WiFiClient::available()
|
int ICACHE_FLASH_ATTR WiFiClient::available()
|
||||||
|
@ -55,7 +55,6 @@ public:
|
|||||||
|
|
||||||
IPAddress remoteIP();
|
IPAddress remoteIP();
|
||||||
uint16_t remotePort();
|
uint16_t remotePort();
|
||||||
size_t write(Stream&);
|
|
||||||
|
|
||||||
friend class WiFiServer;
|
friend class WiFiServer;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user