Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
A server-side function to generate of Server-sent events.
See the w3c page and this blog post.
val set_headers : Headers.t -> unit
Set headers of the response. This is not mandatory but if used at all, it must be called before any call to send_event
(once events are sent the response is already sent too).
Send an event from the server. If data is a multiline string, it will be sent on separate "data:" lines.