One last thing: sizeof(sse_resp) should be sizeof(sse_resp)-1 because sse_resp implicitly includes a "\0" terminator which you should not send.Code: Select all
httpd_socket_send(mySocketHD, mySocketFD, sse_resp, sizeof(sse_resp), 0);
Implementation of Server-Sent Events (SSE) in ESP-IDF
-
MicroController
- Posts: 2669
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: Implementation of Server-Sent Events (SSE) in ESP-IDF
-
SirrCharles
- Posts: 3
- Joined: Sun Jun 04, 2017 4:39 am
Re: Implementation of Server-Sent Events (SSE) in ESP-IDF
A client example of this would be fantastic!
-
Maximilian22
- Posts: 9
- Joined: Mon Jan 29, 2024 11:58 am
Re: Implementation of Server-Sent Events (SSE) in ESP-IDF
Of course you are right, I had overlooked that.One last thing: sizeof(sse_resp) should be sizeof(sse_resp)-1 because sse_resp implicitly includes a "\0" terminator which you should not send.Code: Select all
httpd_socket_send(mySocketHD, mySocketFD, sse_resp, sizeof(sse_resp), 0);
Thank you very much for your kind help, much appreciated!
Who is online
Users browsing this forum: Amazon [Bot], Google [Bot], Qwantbot, Semrush [Bot] and 3 guests