• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Server Sent Events (Project 3.x)

Q&A Forum › Category: ESP32 › Server Sent Events (Project 3.x)
0 Vote Up Vote Down
Sheldon Furst asked 4 years ago

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?
 
https://pastebin.com/Zum6Qsdp

1 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.

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()).

events.send("ping",NULL,millis());

I can elaborate more on the eBook on the next eBook update.

Thanks for your feedback.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.