Table of Contents

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 CompactPubKey

Peer public key

tcpClient TcpClient

TCP 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 TcpClient

TCP client

Returns

Task<IPeerService>

A task that represents the asynchronous operation. The task result contains the created peer.