ProtoBook class abstract

ProtoBook tracks the protocols supported by peers.

Implementers

Constructors

ProtoBook.new()

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

addProtocols(PeerId id, List<ProtocolID> protocols) → void
AddProtocols adds the given protocols to the peer.
firstSupportedProtocol(PeerId id, List<ProtocolID> protocols) Future<ProtocolID?>
FirstSupportedProtocol returns the first protocol that the peer supports among the given protocols. If the peer does not support any of the given protocols, this function will return null.
getProtocols(PeerId id) Future<List<ProtocolID>>
GetProtocols returns the protocols registered for the given peer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removePeer(PeerId id) → void
RemovePeer removes all protocols associated with a peer.
removeProtocols(PeerId id, List<ProtocolID> protocols) → void
RemoveProtocols removes the given protocols from the peer.
setProtocols(PeerId id, List<ProtocolID> protocols) → void
SetProtocols sets the protocols for the given peer (replacing any previously stored protocols).
supportsProtocols(PeerId id, List<ProtocolID> protocols) Future<List<ProtocolID>>
SupportsProtocols returns the set of protocols the peer supports from among the given protocols. If the returned error is not null, the result is indeterminate.
toString() String
A string representation of this object.
inherited

Operators

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