Function esp_ward::connectivity::mqtt::mqtt_receive

source ·
pub async fn mqtt_receive<'a>(
    client: &mut MqttClient<'a, TcpSocket<'a>, 5, CountingRng>
) -> String<32>
Expand description

Waits for and receives a message from the subscribed MQTT topics. It handles reconnection in case of network errors.

§Arguments

  • client - A mutable reference to the MQTT client used for receiving messages.

§Returns

Returns a String containing the received message if successful.