Skip to content

ISites

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

The bound sites and relays into them (ICorePluginContext.Sites). A plugin that offers a server to devices (they connect to it: NTP, syslog, an HTTP endpoint) opens one relay per site; the node listens on the port and passes every datagram or connection to the plugin. The host closes a plugin’s relays when it turns off or stops and opens them again after the node reconnects.

public interface ISites
IReadOnlyList<ISiteInfo> List { get; }

Every bound site now.

Task<ITcpRelay> OpenTcpRelayAsync(Guid siteId, int port, string reason, CancellationToken ct)

Listens on TCP port at the site, like ISites.OpenUdpRelayAsync.

Task<IUdpRelay> OpenUdpRelayAsync(Guid siteId, int port, string reason, CancellationToken ct)

Listens on UDP port at the site. Asks the node app for the port (Listen on, with reason) when it is not allowed yet; the relay’s IRelay.State says so meanwhile.

event EventHandler? SitesChanged

A site was bound, renamed, removed, or went online or offline.