RelayManagerProtocol extension
What a RelayProtocolHandler needs from a RelayManager, besides REQs and
EVENTs. It comes from package:dostr_core/protocol.dart.
- on
Methods
-
accountForAuth(
AuthPolicy? auth) → NostrSigner? -
Available on RelayManager, provided by the RelayManagerProtocol extension
Accountauthauthenticates as, null when it must stay unattributable. -
addProtocolHandler(
RelayProtocolHandler handler) → void -
Available on RelayManager, provided by the RelayManagerProtocol extension
Handshandlerthe messages, CLOSED and NOTICE this manager does not handle itself, and keeps the connections it still needs open. -
removeProtocolHandler(
RelayProtocolHandler handler) → void -
Available on RelayManager, provided by the RelayManagerProtocol extension
Stops handing messages tohandler. -
send(
RelayConnectionKey key, List message) → void -
Available on RelayManager, provided by the RelayManagerProtocol extension
Sendsmessage, a JSON array such as["NEG-CLOSE", subscriptionId], on the connection behindkeyonce its socket is ready. The message is dropped and logged when there is no such connection, or when its socket goes away first.