class SseSink
source · line 9public
public class SseSink private constructor(private val writer: AsyncSseWriter) : AsyncCloseable
- Supertype
AsyncCloseable
Serial SSE output over a borrowed sink; closing releases only local resources.
property isClosed
source · line 14public
public val isClosed: Boolean
get: public read-only
Whether local cleanup has completed.
getter get
source · line 14public
get(): Boolean
function flush
source · line 29public
public suspend fun flush(): Unit
Flushes the borrowed downstream sink without ending its HTTP body.
property failure
source · line 16public
public val failure: Throwable?
get: public read-only
The original terminal write or flush failure, when one occurred.
getter get
source · line 16public
get(): Option<Throwable>
constructor constructor
source · line 11public
constructor(sink: AsyncByteSink, bufferSize: Long = 8192L)
Creates a bounded output adapter on the current event loop without writing bytes.
parameter sink
source · line 11public
sink: AsyncByteSink
parameter bufferSize
source · line 11public
bufferSize: Long = 8192L
function close
source · line 32public
public override suspend fun close(): Unit
- Overrides
close
Cancels and joins in-flight output before releasing the local buffer.
function send
source · line 19public
public suspend fun send(message: SseMessage): Unit
Sends a complete block with backpressure, without implicitly flushing.
parameter message
source · line 19public
message: SseMessage
function comment
source · line 24public
public suspend fun comment(text: String): Unit
Sends a complete comment block, without implicitly flushing.
parameter text
source · line 24public
text: String