I am using Esp8266 Wifi modular (12-E) for controlling a led through the access of wifi/webserver. I have written code in Arduino ide taking various references from the google.In the code, I didn't understand the client.flush(), why we are using this method? In google, I have searched about many explanations, I got common to explain which I don't understand till yet. "Waits for the transmission of outgoing serial data to complete." I didn't get till yet. can anyone explain to me in simple terms?
/
/ Wait until the client sends some data
Serial.println("new client");
while(!client.available()){
delay(1);
}
// Read the first line of the request
String request = client.readStringUntil('\r');
Serial.println(request);
client.flush();