Table of Contents

Class PeerAddress

Namespace
NLightning.Bolts.BOLT1.Primitives
Assembly
NLightning.Bolts.dll

Represents a peer address.

public sealed class PeerAddress
Inheritance
PeerAddress
Inherited Members

Constructors

PeerAddress(PubKey, string)

Initializes a new instance of the PeerAddress class.

public PeerAddress(PubKey pubKey, string address)

Parameters

pubKey PubKey

The public key.

address string

The address.

Remarks

The address is in the format of "http://host:port" or "host:port".

PeerAddress(PubKey, string, int)

Initializes a new instance of the PeerAddress class.

public PeerAddress(PubKey pubKey, string host, int port)

Parameters

pubKey PubKey

The public key.

host string

The host.

port int

The port.

PeerAddress(string)

Initializes a new instance of the PeerAddress class.

public PeerAddress(string address)

Parameters

address string

The address.

Remarks

The address is in the format of "pubkey@host:port".

Properties

Host

Gets the host.

public IPAddress Host { get; }

Property Value

IPAddress

Port

Gets the port.

public int Port { get; }

Property Value

int

PubKey

Gets the public key.

public PubKey PubKey { get; }

Property Value

PubKey

Methods

ToString()

Returns a string that represents the address.

public override string ToString()

Returns

string

A string in the format of "pubkey@host:port".