Package-level declarations

Types

Link copied to clipboard
interface ServerSSESession : CoroutineScope

Represents a server-side server-sent events session. An ServerSSESession allows the server to send ServerSentEvent to the client over a single HTTP connection.

Link copied to clipboard

An OutgoingContent response object that could be used to respond(). It will start Server-Sent events SSE session.

Properties

Link copied to clipboard

Server-Sent Events (SSE) support plugin. It is required to be installed first before binding any sse endpoints.

Functions

Link copied to clipboard
fun Routing.sse(handler: suspend ServerSSESession.() -> Unit)

Adds a route to handle Server-Sent Events (SSE) using the provided handler. Requires SSE plugin to be installed.

fun Routing.sse(path: String, handler: suspend ServerSSESession.() -> Unit)

Adds a route to handle Server-Sent Events (SSE) at the specified path using the provided handler. Requires SSE plugin to be installed.