heartbeat

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

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.

Report a problem

Parameters

heartbeatConfig

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