formatSseEvent

Frame a JSON-RPC message as a Server-Sent Events block. Per the transport Resumability/Redelivery section, the server attaches an id: line so a client can reconnect with Last-Event-ID; the id MUST be globally unique within the session, which the caller guarantees via a per-stream ordinal plus a monotonic event sequence. An empty id omits the line.

@safe
string
formatSseEvent
(
string id
,
Json msg
)