Skip to content

IRelay

Interface in Oadm.Sdk.Sites · Oadm.Sdk.dll

A listener at a site (or on the server’s own network, IPluginNetwork).

public interface IRelay : IAsyncDisposable

Extends IAsyncDisposable
Extended or implemented by ITcpRelay, IUdpRelay

int Port { get; }

The port.

SiteProtocol Protocol { get; }

UDP or TCP.

Guid? SiteId { get; }

The site; null for a listener on the server’s own network.

RelayState State { get; }

Now.

string StateText { get; }

The state in plain words for a page (“NTP at Building B: waiting for approval in the OADM Site Node app”).

ValueTask ReleaseAsync()

Default implementation

Closes the relay for good because the plugin no longer serves there (a setting changed): the site node gives the port back (it drops the port it allowed from the plugin’s request; a port its administrator added stays). Dispose instead when the plugin only stops (the server shuts down, the plugin is turned off): the port stays allowed for the next start. Default: dispose.

event EventHandler? StateChanged

The state changed.