7 ms·
"just works" in the sense that this is a complete SSE client application: while true; do curl example.com/sse | handle-messages.sh done Becaus
by benwilber0 1y ago
"just works" in the sense that this is a complete SSE client application:
while true; do
curl example.com/sse | handle-messages.sh
done
Because it's just text-over-http. This isn't possible with websockets without some kind of custom client and layer 7 protocol stack.
- anamexis 1y agoIt’s functional, but I wouldn’t say it’s complete without Last-Event-Id handling.
- deleted 1y ago[deleted]
- Sammi 1y agoYou could do a lobotomized WebSockets implementation that was an extremely thin layer on top of http, similarly to this. In this way SSE and WebSockets are exactly the same. They are HTTP requests that you keep open. To firewalls and other network equipment both look the same. They look like long lived http requests, because that is what they are.