Struct SseStream

Struct Documentation

struct SseStream

Server-Sent Events stream shape returned by RouteRegistry::sse handlers. Each call to next_event writes one event into the cpp-httplib data sink (formatted data: <json>\n\n) and returns true to continue or false to terminate the stream.

Minimum viable shape - real-world callers (fault stream, log stream) will likely move to a typed TEvent-aware variant on top of this in their migration commit.

Public Members

std::function<bool(httplib::DataSink &sink)> next_event