IRecipientSession
Interface in Oadm.Sdk.Actions · Oadm.Sdk.dll
One open connection of a persistent recipient (SDK 0.12.0, MQTT, Modbus, OPC UA), shared by every rule that chooses the recipient. What it can send is the plugin’s own interface: an action asks for it with IActionContext.SessionAsync, and the host never knows the protocol. Several actions use a session at the same time, so a protocol that sends one request at a time keeps its own order.
public interface IRecipientSession : IAsyncDisposableExtends IAsyncDisposable
Methods
Section titled “Methods”ConnectAsync
Section titled “ConnectAsync”Task ConnectAsync(CancellationToken ct)Opens the connection; throws with a plain reason when it cannot. The login is checked here.
Events
Section titled “Events”Dropped
Section titled “Dropped”event EventHandler<RecipientDroppedEventArgs>? DroppedRaised once when the connection ended by itself; the host opens a new session after a wait.