Redbean: How to listen to server-sent events? #1371
Unanswered
cloudspeech
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I am aware it is possible to send server-sent events (SSE) with Redbean resp. its Lua integration, cf. #159.
I also know that Fetch is exposed in Lua land. That's useful for one-shot request-response scenarios, and can set a keepalive flag.
What I could not figure out is whether it is possible to listen continously from inside Redbean to a SSE stream and invoke Lua callbacks whenever an event is received.
This is e.g. available in the OpenResty eco system, cf. https://github.com/wojons/lua-resty-sse.
Any ideas for how to write a SSE client, or proof it currently can or cannot be done in Redbean?
Thanks a lot, Markus
Beta Was this translation helpful? Give feedback.
All reactions