Class RandomWalk
Periodically queries the DHT to discover new peers.
Implements
Inherited Members
Namespace: Ipfs.Engine
Assembly: Ipfs.Engine.dll
Syntax
public class RandomWalk : IService
Remarks
A backgroud task is created to query the DHT. It is designed to run often at startup and then less often at time increases.
Fields
| Improve this Doc View SourceDelay
The time to wait until running the query.
Declaration
public TimeSpan Delay
Field Value
Type | Description |
---|---|
TimeSpan |
DelayIncrement
The time to add to the Delay.
Declaration
public TimeSpan DelayIncrement
Field Value
Type | Description |
---|---|
TimeSpan |
DelayMax
The maximum Delay.
Declaration
public TimeSpan DelayMax
Field Value
Type | Description |
---|---|
TimeSpan |
Properties
| Improve this Doc View SourceDht
The Distributed Hash Table to query.
Declaration
public IDhtApi Dht { get; set; }
Property Value
Type | Description |
---|---|
IDhtApi |
Methods
| Improve this Doc View SourceStartAsync()
Start a background process that will run a random walk every Delay.
Declaration
public Task StartAsync()
Returns
Type | Description |
---|---|
Task |
StopAsync()
Stop the background process.
Declaration
public Task StopAsync()
Returns
Type | Description |
---|---|
Task |