Scoop API

scoop:scoop.http.asyncio:0.1.0

SseSource

class SseSource

source · line 11
public
public class SseSource private constructor(private val reader: SseReader) : 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 51
public
public suspend fun next(): SseEvent?

Reads until an event is available or input ends, updating stream ID and retry state.

function close

source · line 56
public
public override suspend fun close(): Unit

Closes parser/writer state and an endpoint whose ownership was transferred; borrowed endpoints retain their own cleanup responsibility.

property lastEventId

source · line 39
public
public val lastEventId: String

get: public read-only

The current event-stream last-event ID, including updates with no dispatched event.