write() returning
byte : the number of bytes written. It is not necessary to read this.
https://www.arduino.cc/en/Reference/WiFiClientWrite
however V2.2.0 ESP8266WiFi ClientContext.h write() returns
return will_send - _size_sent;
were as it should return
return size_sent;
to be consistent with Arduino docs, and with usual C definition of write()
OR could return
return will_send;
since
_size_sent = will_send;
is set a few lines above