Skip to main content

ClikaRT::http::ServerSentEvent

struct

Header: ClikaRT/http/types.h

One Server-Sent-Events frame. On the server (ServerResponse::sse) data is the payload to send (often a JSON delta) and a CR/LF in any field is stripped/normalized by the framer so it cannot inject extra SSE fields; on the client (get_sse / post_sse) it is one parsed incoming event.

Data members

event

std::string event = "message"

event type ("message" is the SSE default)

Declared in ClikaRT/http/types.h, line 74

data

std::string data

the payload (the data: field)

Declared in ClikaRT/http/types.h, line 75

id

std::string id

last-event-id, for resumption

Declared in ClikaRT/http/types.h, line 76