AddrBook class abstract

AddrBook holds the multiaddrs of peers.

Implementers

Constructors

AddrBook.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

addAddr(PeerId p, MultiAddr addr, Duration ttl) Future<void>
AddAddr calls AddAddrs(p, addr, ttl)
addAddrs(PeerId p, List<MultiAddr> addrs, Duration ttl) Future<void>
AddAddrs gives this AddrBook addresses to use, with a given ttl (time-to-live), after which the address is no longer valid. If the manager has a longer TTL, the operation is a no-op for that address
addrs(PeerId p) Future<List<MultiAddr>>
Addrs returns all known (and valid) addresses for a given peer.
addrStream(PeerId id) Future<Stream<MultiAddr>>
AddrStream returns a stream that gets all addresses for a given peer sent on it. If new addresses are added after the call is made they will be sent along through the stream as well.
clearAddrs(PeerId p) Future<void>
ClearAddresses removes all previously stored addresses.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
peersWithAddrs() Future<List<PeerId>>
PeersWithAddrs returns all the peer IDs stored in the AddrBook.
setAddr(PeerId p, MultiAddr addr, Duration ttl) Future<void>
SetAddr calls SetAddrs(p, addr, ttl)
setAddrs(PeerId p, List<MultiAddr> addrs, Duration ttl) Future<void>
SetAddrs sets the ttl on addresses. This clears any TTL there previously. This is used when we receive the best estimate of the validity of an address.
toString() String
A string representation of this object.
inherited
updateAddrs(PeerId p, Duration oldTTL, Duration newTTL) Future<void>
UpdateAddrs updates the addresses associated with the given peer that have the given oldTTL to have the given newTTL.

Operators

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