IConnection¶
Namespace: MQTT_Receiver_Worker.MQTT.Interfaces
Interface for MQTT broker connection management.
Provides abstraction for establishing MQTT connections and handling message processing.
Properties¶
IsConnected¶
Gets a value indicating whether the MQTT client is currently connected.
Property Value¶
Methods¶
DisconnectAsync()¶
Disconnects from the MQTT broker.
Returns¶
A task that represents the asynchronous operation.
GetConnectionAsync()¶
Establishes a connection to the MQTT broker and configures message handlers.
Returns¶
A task that represents the asynchronous operation. The task result contains the connected MQTT client, or null if connection failed.
TryConnectAsync()¶
Attempts to connect to the MQTT broker.
Returns¶
A task that represents the asynchronous operation. The task result indicates whether the connection was successful.