In your Building Web Servers course you kind of gloss over the SSE interface. Specifically, the need to pass the time via millis() and the sending of “ping”. When you update the course can you elaborate a little more on this?
Yes. I can elaborate a bit about that.
That line is used on the SSE examples of the ESPASyncWebServer library. That line is not mandatory.
It is used to check on the client side that the server is alive.
Basically, we’re sending a message “ping” to the server, every x number of seconds.
The message is “ping”, it doesn’t have a specific event assigned to it, and we should also pass the time (millis()).
I can elaborate more on the eBook on the next eBook update.
Thanks for your feedback.