Relay

abstract class Relay

Inheritors

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
abstract val allEvents: Flow<Event>

The subset of RelayMessage that only contain messages of type EventMessage

Link copied to clipboard

The subset of allEvents that are of type EncryptedDm

Link copied to clipboard
val notes: Flow<Event>

The subset of allEvents that are of type TextNote

Link copied to clipboard
val reactions: Flow<Event>

The subset of allEvents that are of type Reaction

Link copied to clipboard
abstract val relayMessages: Flow<RelayMessage>

All messages transmitted by this relay for our active subscriptions

Link copied to clipboard
val userMetaData: Flow<Event>

The subset of allEvents that are of type UserMetaData

Functions

Link copied to clipboard
abstract fun send(event: Event)

Queue an event to be sent (potentially immediately)

Link copied to clipboard
abstract fun start()

Begin sending and receiving events with this Relay

Link copied to clipboard
abstract fun stop()

Stop sending and receiving events with this Relay

Link copied to clipboard
fun subscribe(filter: Filter, subscription: Subscription = Subscription(randomSubscriptionId())): Subscription

Create a new subscription with exactly one filter

abstract fun subscribe(filters: Set<Filter>, subscription: Subscription = Subscription(randomSubscriptionId())): Subscription

Create a new subscription with zero to many filters

Link copied to clipboard
abstract fun unsubscribe(subscription: Subscription)

Unsubscribe from a subscription