Manages the swarm of peers.
Namespace: Ipfs.CoreApi Assembly: Ipfs.Core.dll Syntaxpublic interface ISwarmApi
Methods | Improve this Doc View Source AddAddressFilterAsync(MultiAddress, Boolean, CancellationToken)
Adds a new address filter.
DeclarationTask<MultiAddress> AddAddressFilterAsync(MultiAddress address, bool persist = false, CancellationToken cancel = default(CancellationToken))
Parameters Type Name Description MultiAddress address
An allowed address. For example "/ip4/104.131.131.82" or "/ip4/192.168.0.0/ipcidr/16".
Boolean persistIf true the filter will persist across daemon reboots.
CancellationToken cancelIs used to stop the task. When cancelled, the TaskCanceledException is raised.
Returns Type Description Task<MultiAddress>A task that represents the asynchronous operation. The task's result is the address filter that was added.
See Also | Improve this Doc View Source AddressesAsync(CancellationToken)Get the peers in the current swarm.
DeclarationTask<IEnumerable<Peer>> AddressesAsync(CancellationToken cancel = default(CancellationToken))
Parameters Returns Type Description Task<IEnumerable<Peer>>
A task that represents the asynchronous operation. The task's value is a sequence of peer nodes.
| Improve this Doc View Source ConnectAsync(MultiAddress, CancellationToken)Connect to a peer.
DeclarationTask ConnectAsync(MultiAddress address, CancellationToken cancel = default(CancellationToken))
Parameters Returns | Improve this Doc View Source DisconnectAsync(MultiAddress, CancellationToken)
Disconnect from a peer.
DeclarationTask DisconnectAsync(MultiAddress address, CancellationToken cancel = default(CancellationToken))
Parameters Returns | Improve this Doc View Source ListAddressFiltersAsync(Boolean, CancellationToken)
List all the address filters.
DeclarationTask<IEnumerable<MultiAddress>> ListAddressFiltersAsync(bool persist = false, CancellationToken cancel = default(CancellationToken))
Parameters Returns Type Description Task<IEnumerable<MultiAddress>>
A task that represents the asynchronous operation. The task's result is a sequence of addresses filters.
See Also | Improve this Doc View Source PeersAsync(CancellationToken)Get the peers that are connected to this node.
DeclarationTask<IEnumerable<Peer>> PeersAsync(CancellationToken cancel = default(CancellationToken))
Parameters Returns Type Description Task<IEnumerable<Peer>>
A task that represents the asynchronous operation. The task's value is a sequence of Peer.
| Improve this Doc View Source RemoveAddressFilterAsync(MultiAddress, Boolean, CancellationToken)Delete the specified address filter.
DeclarationTask<MultiAddress> RemoveAddressFilterAsync(MultiAddress address, bool persist = false, CancellationToken cancel = default(CancellationToken))
Parameters Type Name Description MultiAddress address
For example "/ip4/104.131.131.82" or "/ip4/192.168.0.0/ipcidr/16".
Boolean persistIf true the filter is also removed from the persistent store.
CancellationToken cancelIs used to stop the task. When cancelled, the TaskCanceledException is raised.
Returns Type Description Task<MultiAddress>A task that represents the asynchronous operation. The task's result is the address filter that was removed.
See Also See AlsoRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4