Table of Contents

Struct ConnectedPeer

Namespace
NLightning.Infrastructure.Node.ValueObjects
Assembly
NLightning.Infrastructure.dll
public readonly record struct ConnectedPeer : IEquatable<ConnectedPeer>
Implements
Inherited Members

Constructors

ConnectedPeer(CompactPubKey, string, uint, TcpClient)

Represents a connected peer in the network, consisting of a compact public key and a TCP client.

public ConnectedPeer(CompactPubKey compactPubKey, string host, uint port, TcpClient tcpClient)

Parameters

compactPubKey CompactPubKey

The compact public key of the peer.

host string
port uint
tcpClient TcpClient

The TCP client representing the connection to the peer.

Properties

CompactPubKey

The public key of the peer we are connected to.

public CompactPubKey CompactPubKey { get; }

Property Value

CompactPubKey

Host

The host address of the connected peer.

public string Host { get; }

Property Value

string

Port

The port used by the peer to establish the connection.

public uint Port { get; }

Property Value

uint

TcpClient

The TCP client representing the connection to the peer.

public TcpClient TcpClient { get; }

Property Value

TcpClient