We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2fc2bcb commit de9873dCopy full SHA for de9873d
hardware/esp8266com/esp8266/libraries/ESP8266WiFi/src/WiFiClient.h
@@ -56,6 +56,28 @@ class WiFiClient : public Client {
56
IPAddress remoteIP();
57
uint16_t remotePort();
58
59
+ template<typename T> size_t write(T &src){
60
+ uint8_t obuf[1460];
61
+ size_t doneLen = 0;
62
+ size_t sentLen;
63
+ int i;
64
+
65
+ while (src.available() > 1460){
66
+ src.read(obuf, 1460);
67
+ sentLen = write(obuf, 1460);
68
+ doneLen = doneLen + sentLen;
69
+ if(sentLen != 1460){
70
+ return doneLen;
71
+ }
72
73
74
+ uint16_t leftLen = src.available();
75
+ src.read(obuf, leftLen);
76
+ sentLen = write(obuf, leftLen);
77
78
79
80
81
friend class WiFiServer;
82
83
using Print::write;
0 commit comments