struct SseStream {
struct TcpStream s;
int ok;
}Fields
0 once a write failed (the client left)
Methods
Writes "200 OK" with Content-Type: text/event-stream, Cache-Control: no-cache and 'extra_headers' (null or "Name: value" lines), and detaches the connection.
"data: ..." (one data: line per line of 'data') + blank line.
With an optional event name and id (null to omit).
": text" — a comment, the usual keep-alive ping.
"retry: ms" — the client's reconnection delay.
= drop()