Class PeerAddress
- Namespace
- NLightning.Infrastructure.Protocol.Models
- Assembly
- NLightning.Infrastructure.dll
Represents a peer address.
public sealed class PeerAddress
- Inheritance
-
PeerAddress
- Inherited Members
Constructors
PeerAddress(CompactPubKey, string)
Initializes a new instance of the PeerAddress class.
public PeerAddress(CompactPubKey pubKey, string address)
Parameters
pubKey
CompactPubKeyThe public key.
address
stringThe address.
Remarks
The address is in the format of "http://host:port" or "host:port".
PeerAddress(CompactPubKey, string, int)
Initializes a new instance of the PeerAddress class.
public PeerAddress(CompactPubKey pubKey, string host, int port)
Parameters
pubKey
CompactPubKeyThe public key.
host
stringThe host.
port
intThe port.
PeerAddress(PeerAddressInfo)
public PeerAddress(PeerAddressInfo peerAddressInfo)
Parameters
peerAddressInfo
PeerAddressInfo
PeerAddress(string)
Initializes a new instance of the PeerAddress class.
public PeerAddress(string address)
Parameters
address
stringThe address.
Remarks
The address is in the format of "pubkey@host:port".
Properties
Host
Gets the host.
public IPAddress Host { get; }
Property Value
Port
Gets the port.
public int Port { get; }
Property Value
PubKey
Gets the public key.
public CompactPubKey PubKey { get; }
Property Value
Methods
ToString()
Returns a string that represents the address.
public override string ToString()
Returns
- string
A string in the format of "pubkey@host:port".