class SseSource
source · line 11public class SseSource private constructor(private val reader: SseReader) : AsyncCloseable
- Supertype
AsyncCloseable
A single-pass event-stream reader over a borrowed source by default. It tracks last-event ID and retry fields but does not open or reconnect network transports.
function next
source · line 51public suspend fun next(): SseEvent?
Reads until an event is available or input ends, updating stream ID and retry state.
property isClosed
source · line 35public val isClosed: Boolean
get: public read-only
Whether adapter cleanup has completed.
getter get
source · line 35get(): Boolean
property failure
source · line 47public val failure: Throwable?
get: public read-only
The retained terminal exception, or None before failure.
getter get
source · line 47get(): Option<Throwable>
function close
source · line 56public override suspend fun close(): Unit
- Overrides
close
Closes parser/writer state and an endpoint whose ownership was transferred; borrowed endpoints retain their own cleanup responsibility.
property lastEventId
source · line 39public val lastEventId: String
get: public read-only
The current event-stream last-event ID, including updates with no dispatched event.
getter get
source · line 39get(): String
property isFinished
source · line 31public val isFinished: Boolean
get: public read-only
Whether the complete protocol boundary or input end has been reached.
getter get
source · line 31get(): Boolean
constructor constructor
source · line 12constructor(source: AsyncByteSource, limits: SseLimits = SseLimits(), initialLastEventId: String = "", bufferSize: Long = 8192L)
parameter initialLastEventId
source · line 12initialLastEventId: String = ""
parameter source
source · line 12source: AsyncByteSource
parameter limits
source · line 12limits: SseLimits = SseLimits()
parameter bufferSize
source · line 12bufferSize: Long = 8192L
property retryMilliseconds
source · line 43public val retryMilliseconds: Long?
get: public read-only
The most recent valid server retry interval in milliseconds, if supplied.
getter get
source · line 43get(): Option<Long>