Heartbeat

Represents a heartbeat configuration for a ServerSSESession.

Report a problem

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

the ServerSentEvent to be sent as the heartbeat, default is a ServerSentEvent with the comment "heartbeat". Ignored when eventProvider is set.

Link copied to clipboard
var eventProvider: suspend () -> ServerSentEvent?

when set, invoked on each tick to produce the ServerSentEvent (e.g. for a per-tick timestamp); takes precedence over event.

Link copied to clipboard

the duration between heartbeat events, default is 30 seconds.