incoming

abstract val incoming: Flow<TypedServerSentEvent<String>>(source)

An incoming Server-Sent Events (SSE) flow.

Each TypedServerSentEvent can contain following fields:

  • TypedServerSentEvent.data data field of the event. It can be deserialized into an object of desired type using the deserialize function

  • TypedServerSentEvent.event string identifying the type of event.

  • TypedServerSentEvent.id event ID.

  • TypedServerSentEvent.retry reconnection time, in milliseconds to wait before reconnecting.

  • TypedServerSentEvent.comments comment lines starting with a ':' character.

Report a problem