Function esp_ward::connectivity::mqtt::mqtt_connect_default
source · pub async fn mqtt_connect_default<'a>(
stack: &'static Stack<WifiDevice<'static, WifiStaDevice>>,
client_id: &'a str,
rx_buffer_socket: &'a mut [u8],
tx_buffer_socket: &'a mut [u8],
write_buffer_mqtt: &'a mut [u8; 4096],
recv_buffer_mqtt: &'a mut [u8; 4096]
) -> MqttClient<'a, TcpSocket<'a>, 5, CountingRng>Expand description
Establishes a default MQTT connection with predefined settings: HiveMQ broker
§Arguments
stack- A reference to the network stack.client_id- The MQTT client identifier.rx_buffer_socket- Receive buffer for the socket.tx_buffer_socket- Transmit buffer for the socket.write_buffer_mqtt- Write buffer for MQTT client.recv_buffer_mqtt- Receive buffer for MQTT client.
§Returns
An MqttClient instance configured for communication.