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
peerAddressInfoPeerAddressInfoThe peer address to connect to.
Returns
- Task
A task that represents the asynchronous operation.
DisconnectPeer(CompactPubKey)
Disconnects a peer.
void DisconnectPeer(CompactPubKey compactPubKey)
Parameters
compactPubKeyCompactPubKeyCompactPubKey of the peer
StartAsync(CancellationToken)
Starts the peer manager asynchronously.
Task StartAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenThe 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.