backgroundtasks() timeout max ? -- but responsive WebServer.handleClient();

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
tozett
Normal user
Posts: 734
Joined: 22 Dec 2015, 15:46
Location: Germany

backgroundtasks() timeout max ? -- but responsive WebServer.handleClient();

#1 Post by tozett » 03 Sep 2016, 10:09

i tried to understand somethin of the source (and maybe code a plugin ;) )
and have a question. may anyobody shed some light for me on this?

the webserver-handle is called inbetween the send-delay.
so while waiting to send another message the webserver is handled, i guess.
if found this in the source:

https://github.com/ESP8266nu/ESPEasy/bl ... er.ino#L27

Code: Select all

if (Settings.MessageDelay != 0)
  {
    uint16_t dif = millis() - lastSend;
    if (dif < Settings.MessageDelay)
    {
      uint16_t delayms = Settings.MessageDelay - dif;
      char log[30];
      sprintf_P(log, PSTR("HTTP : Delay %u ms"), delayms);
      addLog(LOG_LEVEL_DEBUG_MORE, log);
      unsigned long timer = millis() + delayms;
      while (millis() < timer)
        backgroundtasks();
    }
  }
if i am right, than my question is:
what is (besides that source-code) the max timeout for calling the webserver-handle again?
can i set a timeout/intervall with i.e. 500ms or more (1sek?), before the webserver-handle is called again - but the http-client keeps still responsive?

has anybody any experience with the maximum timeout between calls to the webserver-handle (while keeping a client responsive) ?

thanks for help...
:idea:

Post Reply

Who is online

Users browsing this forum: No registered users and 129 guests