class SseWriter
source · line 9public
public class SseWriter internal constructor(private val sink: SseSink)
A borrowed, serial event writer, valid only during its SSE producer.
function comment
source · line 25public
public suspend fun comment(text: String, flush: Boolean = true): Unit
Sends one complete comment and, by default, flushes it before returning.
parameter flush
source · line 25public
flush: Boolean = true
parameter text
source · line 25public
text: String
function send
source · line 20public
public suspend fun send(message: SseMessage, flush: Boolean = true): Unit
Sends one complete event and, by default, flushes it before returning.
parameter message
source · line 20public
message: SseMessage
parameter flush
source · line 20public
flush: Boolean = true
function flush
source · line 30public
public suspend fun flush(): Unit
Flushes previously batched events without ending the response.