A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://richardschneider.github.io/net-ipfs-core/api/Ipfs.CoreApi.ISwarmApi.html below:

Interface ISwarmApi

Manages the swarm of peers.

Namespace: Ipfs.CoreApi Assembly: Ipfs.Core.dll Syntax
public interface ISwarmApi
Methods | Improve this Doc View Source AddAddressFilterAsync(MultiAddress, Boolean, CancellationToken)

Adds a new address filter.

Declaration
Task<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 persist

If true the filter will persist across daemon reboots.

CancellationToken cancel

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

Declaration
Task<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.

Declaration
Task ConnectAsync(MultiAddress address, CancellationToken cancel = default(CancellationToken))
Parameters Returns | Improve this Doc View Source DisconnectAsync(MultiAddress, CancellationToken)

Disconnect from a peer.

Declaration
Task DisconnectAsync(MultiAddress address, CancellationToken cancel = default(CancellationToken))
Parameters Returns | Improve this Doc View Source ListAddressFiltersAsync(Boolean, CancellationToken)

List all the address filters.

Declaration
Task<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.

Declaration
Task<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.

Declaration
Task<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 persist

If true the filter is also removed from the persistent store.

CancellationToken cancel

Is 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 Also

RetroSearch 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