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
hoststringThe host of the node, a bare hostname or IP address. Wrap IPv6 address literals in brackets.
portintThe port of the node.
passwordstringThe password used to authenticate with the node.
isSecureboolWhether 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
IsSecure
Whether the endpoint is served over TLS.
public bool IsSecure { get; }
Property Value
Password
The password used to authenticate with the node.
public string Password { get; }
Property Value
Port
The port of the node.
public int Port { get; }
Property Value
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.