Class Bitswap1
Bitswap Protocol version 1.0.0
Inherited Members
Namespace: Ipfs.Engine.BlockExchange
Assembly: Ipfs.Engine.dll
Syntax
public class Bitswap1 : IBitswapProtocol, IPeerProtocol
Properties
| Improve this Doc View SourceBitswap
The Bitswap service.
Declaration
public Bitswap Bitswap { get; set; }
Property Value
Type | Description |
---|---|
Bitswap |
Name
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
String |
Version
Declaration
public SemVersion Version { get; }
Property Value
Type | Description |
---|---|
Semver.SemVersion |
Methods
| Improve this Doc View SourceProcessMessageAsync(PeerConnection, Stream, CancellationToken)
Declaration
public Task ProcessMessageAsync(PeerConnection connection, Stream stream, CancellationToken cancel = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
PeerConnection | connection | |
Stream | stream | |
CancellationToken | cancel |
Returns
Type | Description |
---|---|
Task |
SendWantsAsync(Stream, IEnumerable<WantedBlock>, Boolean, CancellationToken)
Send a want list.
Declaration
public Task SendWantsAsync(Stream stream, IEnumerable<WantedBlock> wants, bool full = true, CancellationToken cancel = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The destination of the want list. |
IEnumerable<WantedBlock> | wants | A sequence of WantedBlock. |
Boolean | full | true if |
CancellationToken | cancel | Is used to stop the task. When cancelled, the TaskCanceledException is raised. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous operation. |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
String |