Web Sockets & Server Sent Events
Closed this issue · 1 comments
name256a commented
Good day,
Do you have any example that illustrates how the above can be developed using the framework?
Regards
svenkubiak commented
Sorry for the late reply. While there is no support for Web Sockets, usage of ServerSentEvent on the server side is quite easy.
Setup your SSE URL in initializeRoutes() in the Bootstrap class, e.g.
...
Bind.serverSentEvent().to("/mysse");
...
Then send data to your SSE endpoint using the ServerSentEventManager at any point in your application.
...
private final ServerSentEventManager sse;
...
sse.send("/sse", "myData");
...
Everything else is handled on the client side, e.g.