damienpontifex / azure-iot-sdk-rs

A rust library for connecting devices to Microsoft Azure IoT Hub
MIT License
14 stars 11 forks source link

Implement explicit ping handling #70

Open Foelsgaard opened 2 years ago

Foelsgaard commented 2 years ago

Adds two features for explicit ping handling. A ping-response feature for adding a PingResponse message and a default feature automatic-pinging that adds the ping thread to the mqtt transport.

The motivation for this change is that we wanted better control over when to ping and how to react if the server did or did not respond. Specifically, we have a case where we seem to lose connection to the server and we want to detect that case by seeing if it responds to our pings.