SSE client on esp32s3
Posted: Fri Apr 04, 2025 1:04 pm
Hi,
I use growthbook to control features on my esp32s3. Growthbook uses SSE (server sent events) to send feature updates to my esp32s3 in "real time".
Is there already a SSE example, where the esp32 is the client and only listens to the server?
I tried to use the http_client library for that, but not sure, if this is the way to use it.
I have 2 different http_clients, one for uploading data to a s3-bucket, and one for growthbook, which should only listens to the SSE events.
Is it safe to use 1 event_handler for both clients?
Or maybe I have to setup an own task for the SSE stuff, since the connection must be open all the time?
Another question I have is about the http-exmple https://github.com/espressif/esp-idf/bl ... _example.c : Can the eventhandler handle chunked data? Line 75-105 I read as: If the data is chunked, then the event_handler does not copy the incoming data into a buffer. So I have to write some own code here to handle chunked data, correct?
Best
I use growthbook to control features on my esp32s3. Growthbook uses SSE (server sent events) to send feature updates to my esp32s3 in "real time".
Is there already a SSE example, where the esp32 is the client and only listens to the server?
I tried to use the http_client library for that, but not sure, if this is the way to use it.
I have 2 different http_clients, one for uploading data to a s3-bucket, and one for growthbook, which should only listens to the SSE events.
Is it safe to use 1 event_handler for both clients?
Or maybe I have to setup an own task for the SSE stuff, since the connection must be open all the time?
Another question I have is about the http-exmple https://github.com/espressif/esp-idf/bl ... _example.c : Can the eventhandler handle chunked data? Line 75-105 I read as: If the data is chunked, then the event_handler does not copy the incoming data into a buffer. So I have to write some own code here to handle chunked data, correct?
Best