Interface IPeerServiceFactory
- Namespace
- NLightning.Domain.Node.Interfaces
- Assembly
- NLightning.Domain.dll
Interface for creating peer services.
public interface IPeerServiceFactory
Methods
CreateConnectedPeerAsync(CompactPubKey, TcpClient)
Creates a peer we're connecting to.
Task<IPeerService> CreateConnectedPeerAsync(CompactPubKey peerPubKey, TcpClient tcpClient)
Parameters
peerPubKey
CompactPubKeyPeer public key
tcpClient
TcpClientTCP client
Returns
- Task<IPeerService>
A task that represents the asynchronous operation. The task result contains the created peer.
CreateConnectingPeerAsync(TcpClient)
Creates a peer connecting to us.
Task<IPeerService> CreateConnectingPeerAsync(TcpClient tcpClient)
Parameters
tcpClient
TcpClientTCP client
Returns
- Task<IPeerService>
A task that represents the asynchronous operation. The task result contains the created peer.