Open JasonWolfson opened 7 years ago
Hi, I did this by editing two files in the Library named as AWS_IOT.cpp and AWS_IOT.h Just Add this Piece of code in AWS_IOT.cpp
bool AWS_IOT::isConnected()
{
bool connectAck = false;
connectAck = aws_iot_mqtt_is_client_connected(&client);
return connectAck;
}
and Add the definition of this function in AWS_IOT.h as below
bool isConnected();
You can use the awsObj.isConnected()
to get the current status of Connection.
Hi, I did this by editing two files in the Library named as AWS_IOT.cpp and AWS_IOT.h Just Add this Piece of code in AWS_IOT.cpp
bool AWS_IOT::isConnected() { bool connectAck = false; connectAck = aws_iot_mqtt_is_client_connected(&client); return connectAck; }
and Add the definition of this function in AWS_IOT.h as below
bool isConnected();
You can use the
awsObj.isConnected()
to get the current status of Connection.
When you call to the function aws_iot_mqtt_is_client_connected(&client); check the last saved state in the class AWS_IoT_Client but doesnt check or update the real state of connection, right?
Hi, I would like to monitor AWS connection status. Could you please tell me whether I can do it with AWS_IoT library?
Thanks, Anusha