Description
Server-sent events: a simple way to stream events from a server
Summary
- a simple way to stream events from a server hello!
- Here I have a handler that just receives events with type panda (like our server was sending in the previous section).
- So you have to explicitly close the connection by calling .close() if you don’t want the client to keep retrying.
- I’m not sure exactly why using HTTP/1.0 made the client close the connection (maybe because the server writes 2 newlines at the end of each event?
- ),