I am learning this esp8266 now, and i saw this code was used in a tutorial for turning on and off a led using wifi, but can someone explain to me how this works?
String req = client.readStringUntil('\r'); // what does client.readStringUntil do?
Serial.println(req);
client.flush(); // what does client.flush do?
if (req.indexOf("/off") != -1) // what does the !=-1?
Hope someone can help me ![]()