RelayConnectivity<T> class

Represents the connectivity of a relay.

Constructors

RelayConnectivity({required RelayConnectionKey key, required Relay relay, RelayInfo? relayInfo, NostrTransport? relayTransport, T? specificEngineData})
Creates a new relay connectivity. relayTransport == null => relay is not connected and is not in connecting state

Properties

hashCode → int
The hash code for this object.
no setterinherited
isConnected → bool
current connection state if connection is open
no setter
key → RelayConnectionKey
identifies this connection: the relay and the identity bound to it
final
relay → Relay
relay data including connection state
final
relayInfo ↔ RelayInfo?
user facing relay info
getter/setter pair
relayTransport ↔ NostrTransport?
transport layer for this relay, usually websocket
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
specificEngineData → T?
specific data that a engine might require for algorithms to work
final
stats ↔ RelayStats
relay stats
getter/setter pair
url → String
relay url/identifier
no setter

Methods

close() → Future<void>
cancels stream subscription and closes relay transport
listen(void onData(dynamic), {Function? onError, void onDone()?}) → void
starts listening on nostr transport
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited