You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, @sirinath
There is currently no API for Server Sent Events. However you can easily achieve this functionality by utilizing 'CSP' module.
Just create a ChannelSupplier of events, encode each event as a separate ByteBuf and send it as a body stream of an HTTP response. And don't forget to add header Content-Type: text/event-stream.
Here is a demo snippet that illustrates how it can be done: https://gist.github.com/eduard-vasinskyi/65287c900a70288a1b298a9027b26ca5
Each second, server sends an event that contains current time.
If you have more questions, please feel free to ask.
We will let you know once full support for Server Sent Events will be implemented.
Do you have a way to do SSE?
If not is there a possibility to add this functionality?
The text was updated successfully, but these errors were encountered: