RelayProtocolHandler class abstract
Runs a protocol of its own over the relay connections, such as NIP-77 negentropy.
Add it with addProtocolHandler, from package:dostr_core/protocol.dart.
It then receives what RelayManager does not handle itself, and sends its
own messages with send.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
hasWorkOn(
RelayConnectionKey key) → bool -
Whether this handler still needs the connection behind
key. A connection it needs is not closed as idle. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onClosed(
RelayConnectionKey key, String subscriptionId, String? message) → bool -
A CLOSED for
subscriptionId. Returns whether this handler owns that subscription, in which caseRelayManagerdoes not treat it as a REQ. -
onMessage(
RelayConnectionKey key, List message) → bool -
A relay message of a type
RelayManagerdoes not know, such as NEG-MSG. Returns whether this handler took it. -
onNotice(
RelayConnectionKey key, String message) → void -
A NOTICE from the relay behind
key. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited