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
PeerAddressInfoThe 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
CompactPubKeyCompactPubKey of the peer
StartAsync(CancellationToken)
Starts the peer manager asynchronously.
Task StartAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenThe 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.