Relay Client
class RelayClient(url: String, client: OkHttpClient = OkHttpClient.Builder().pingInterval(20, TimeUnit.SECONDS).build()) : Relay, ConnectionStateListener
Provides comms to and from a single relay
Constructors
Link copied to clipboard
constructor(url: String, client: OkHttpClient = OkHttpClient.Builder().pingInterval(20, TimeUnit.SECONDS).build())
Properties
Link copied to clipboard
The subset of RelayMessage that only contain messages of type EventMessage
Link copied to clipboard
Link copied to clipboard
The subset of allEvents that are of type EncryptedDm
Link copied to clipboard
All messages transmitted by this relay for our active subscriptions
Link copied to clipboard
The subset of allEvents that are of type UserMetaData
Functions
Link copied to clipboard
fun subscribe(filter: Filter, subscription: Subscription = Subscription(randomSubscriptionId())): Subscription
Create a new subscription with exactly one filter
Create a new subscription with zero to many filters
Link copied to clipboard
Unsubscribe from a subscription
Link copied to clipboard