Table of Contents

Interface IPeerManager

Namespace
NLightning.Domain.Node.Interfaces
Assembly
NLightning.Domain.dll

Interface for the peer manager.

public interface IPeerManager

Methods

ConnectToPeerAsync(PeerAddressInfo)

Connects to a peer.

Task ConnectToPeerAsync(PeerAddressInfo peerAddressInfo)

Parameters

peerAddressInfo PeerAddressInfo

The peer address to connect to.

Returns

Task

A task that represents the asynchronous operation.

DisconnectPeer(CompactPubKey)

Disconnects a peer.

void DisconnectPeer(CompactPubKey compactPubKey)

Parameters

compactPubKey CompactPubKey

CompactPubKey of the peer

StartAsync(CancellationToken)

Starts the peer manager asynchronously.

Task StartAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

The cancellation token to monitor for cancellation requests.

Returns

Task

A task that represents the asynchronous operation.

StopAsync()

Stops the peer manager asynchronously.

Task StopAsync()

Returns

Task

A task that represents the asynchronous operation.