Table of Contents

Class Endpoint

Namespace
Nyra
Assembly
Nyra.dll

Network endpoint of an audio node, both servers serve REST and websocket on the same host and port.

public sealed class Endpoint
Inheritance
Endpoint
Inherited Members

Constructors

Endpoint(string, int, string, bool)

Creates an endpoint.

public Endpoint(string host, int port, string password, bool isSecure = false)

Parameters

host string

The host of the node, a bare hostname or IP address. Wrap IPv6 address literals in brackets.

port int

The port of the node.

password string

The password used to authenticate with the node.

isSecure bool

Whether the endpoint is served over TLS.

Exceptions

ArgumentException

The host or the password is null or blank, or the host is not a bare hostname or IP address.

ArgumentOutOfRangeException

The port is outside the valid range.

Properties

Host

The host of the node, a bare hostname or IP address, IPv6 literals wrapped in brackets.

public string Host { get; }

Property Value

string

IsSecure

Whether the endpoint is served over TLS.

public bool IsSecure { get; }

Property Value

bool

Password

The password used to authenticate with the node.

public string Password { get; }

Property Value

string

Port

The port of the node.

public int Port { get; }

Property Value

int

Methods

ToRestUri()

The base URI of the node's REST API.

public Uri ToRestUri()

Returns

Uri

The base REST URI of the endpoint.

ToString()

Returns the endpoint in host and port form.

public override string ToString()

Returns

string

The endpoint in host and port form.

ToWebSocketUri()

The URI of the node's websocket.

public Uri ToWebSocketUri()

Returns

Uri

The websocket URI of the endpoint.