Package-level declarations
Types
Link copied to clipboard
class Heartbeat
Represents a heartbeat configuration for a ServerSSESession.
Link copied to clipboard
Represents a server-side Server-Sent Events (SSE) session. An ServerSSESession allows the server to send ServerSentEvent to the client over a single HTTP connection.
Link copied to clipboard
Represents a server-side Server-Sent Events (SSE) session with serialization support. An ServerSSESessionWithSerialization allows the server to send ServerSentEvent to the client over a single HTTP connection.
Link copied to clipboard
class SSEServerContent( val call: ApplicationCall, val handle: suspend ServerSSESession.() -> Unit, val serialize: (TypeInfo, Any) -> String? = null) : OutgoingContent.WriteChannelContent
An OutgoingContent response object that could be used to respond()
. It will start Server-Sent events SSE session.
Properties
Functions
Link copied to clipboard
Starts a heartbeat for the ServerSSESession.
Link copied to clipboard
Link copied to clipboard
fun Route.sse(serialize: (TypeInfo, Any) -> String, handler: suspend ServerSSESessionWithSerialization.() -> Unit)
Adds a route to handle Server-Sent Events (SSE) using the provided handler. Requires SSE plugin to be installed.