Subscription

Represents a subscription to external events. Subscriptions allow applications to listen to events like time, keyboard input, or other continuous streams of data.

Parameters

Message

The type of message this subscription will produce

Inheritors

Functions

Link copied to clipboard
abstract suspend fun subscribe(callback: (Message) -> Unit): () -> Unit

Starts the subscription and invokes the callback whenever an event occurs.