Implement Server-Sent Events
text/event-stream framing
Challenge 4 of Networking & ProtocolsIntermediate~45 min
Push updates to a browser over one long-lived HTTP response, no WebSocket handshake required. Implement the text/event-stream wire format: serialize events with data, event, and id fields, then parse a raw stream back into structured events, handling multi-line payloads, comments, and reconnection ids. The transport behind live dashboards, notifications, and token-by-token AI streaming.