RelaySet

data class RelaySet(val relays: Set<Relay>) : Relay

Constructors

Link copied to clipboard
constructor(relays: Set<Relay>)

Properties

Link copied to clipboard
open override 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
open override val relayMessages: Flow<RelayMessage>

All messages transmitted by this relay for our active subscriptions

Link copied to clipboard
Link copied to clipboard
val userMetaData: Flow<Event>

The subset of allEvents that are of type UserMetaData

Functions

Link copied to clipboard
open override fun send(event: Event)

Queue an event to be sent (potentially immediately)

Link copied to clipboard
open override fun start()

Begin sending and receiving events with this Relay

Link copied to clipboard
open override 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

open override fun subscribe(filters: Set<Filter>, subscription: Subscription): Subscription

Create a new subscription with zero to many filters

Link copied to clipboard
open override fun unsubscribe(subscription: Subscription)

Unsubscribe from a subscription