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
CompactPubKeyThe compact public key of the peer.
host
stringport
uinttcpClient
TcpClientThe 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
Host
The host address of the connected peer.
public string Host { get; }
Property Value
Port
The port used by the peer to establish the connection.
public uint Port { get; }
Property Value
TcpClient
The TCP client representing the connection to the peer.
public TcpClient TcpClient { get; }