heartbeat

fun ServerSSESession.heartbeat(heartbeatConfig: Heartbeat.() -> Unit = {})(source)

Starts a heartbeat for the ServerSSESession.

The heartbeat will send the specified Heartbeat.event at the specified Heartbeat.period interval as long as the session is active, or invoke Heartbeat.eventProvider on each tick when set.

Report a problem

Parameters

heartbeatConfig

a lambda that configures the Heartbeat object used for the heartbeat.