Help understanding WifiClient example ?
Posted: Sun Feb 14, 2021 2:19 pm
Hi,
I would like to understand the official WifiClient example located here : https://github.com/espressif/arduino-es ... Client.ino
Specifically this part :
What if the network is really slow, causing a pause between the arrival of two successive lines ? Then it is my understanding client.available() would return 0 since the buffer is empty and there is (temporarily) nothing to read. In this case the loop will end before the whole response from the server is read.
Is there a mistake in the example or is my understanding incorrect ?
Here is the same example for Arduino, which seems ok to me : https://www.arduino.cc/en/Tutorial/Libr ... iWebClient
I would like to understand the official WifiClient example located here : https://github.com/espressif/arduino-es ... Client.ino
Specifically this part :
Code: Select all
// Read all the lines of the reply from server and print them to Serial
while(client.available()) {
String line = client.readStringUntil('\r');
Serial.print(line);
}
Is there a mistake in the example or is my understanding incorrect ?
Here is the same example for Arduino, which seems ok to me : https://www.arduino.cc/en/Tutorial/Libr ... iWebClient