You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WiFiClient setTimeout is documented to accept milliseconds (sane) but value is used as seconds directly (loss of resolution is not sane). Protoype expects u32 instead of f32/f64. #3732
WiFiClient setTimeout is documented to accept milliseconds (sane) but value is used as seconds directly (loss of resolution is not sane). Protoype expects u32 instead of f32/f64.
/path/to/sketch.ino: In function 'void loop()':
sketch:614:31: error: invalid conversion from 'const char*' to 'uint32_t {aka unsigned int}' [-fpermissive]
connection.setTimeout("asd");
^
In file included from /path/to/arduino/.arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/WiFi/src/WiFi.h:37:0,
from /path/to/sketch.ino:5:
/path/to/arduino/.arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/WiFi/src/WiFiClient.h:91:9: note: initializing argument 1 of 'virtual int WiFiClient::setTimeout(uint32_t)'
int setTimeout(uint32_t seconds);
On Linux dell 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11) x86_64 GNU/Linux
Arduino is 1.8.11 Hourly Build 2020/02/05 07:25
Reproduction:
u32 t;
u8 buf[1024];
WiFiClient connection;
connection.connect(server, port);
connection.setTimeout(2);
t=millis();
Serial.print(t);
connection.readBytes(buf, 1024);
//Send say a single character from your server
Serial.print(millis()-t);