EventSourceFactory

fun interface EventSourceFactory

Functions

Link copied to clipboard
open fun asFlow(): Flow<Event>

Converts this EventSourceFactory to a Flow.

Link copied to clipboard
abstract fun create(listener: EventSourceListener): EventSource

Creates a new event source and immediately returns it. Creating an event source initiates an asynchronous process to connect the socket. Once that succeeds or fails, listener will be notified. The caller must cancel the returned event source when it is no longer in use.

Inherited functions

Link copied to clipboard