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 ISitesProperties
Section titled “Properties”IReadOnlyList<ISiteInfo> List { get; }Every bound site now.
Methods
Section titled “Methods”OpenTcpRelayAsync
Section titled “OpenTcpRelayAsync”Task<ITcpRelay> OpenTcpRelayAsync(Guid siteId, int port, string reason, CancellationToken ct)Listens on TCP port at the site, like ISites.OpenUdpRelayAsync.
OpenUdpRelayAsync
Section titled “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.
Events
Section titled “Events”SitesChanged
Section titled “SitesChanged”event EventHandler? SitesChangedA site was bound, renamed, removed, or went online or offline.