axl_bool myqtt_conn_ping ( MyQttConn conn,
int  wait_pingresp 

Allows to send a ping request (PINGREQ) to the server over the provided connection.

The function handles server reply (PINGRESP) and allows to limit reply wait time to the value provided by wait_pingresp.

connThe connection where the PINGREQ will be sent.
wait_pingrespHow many seconds to wait for PINGRESP reply to come.
axl_true if the PINGREQ operation went ok and a PINGRESP was received. Otherwise, axl_false is returned. Remember you can always use myqtt_conn_is_ok to check if the connection is connected and working. Alternatively you can use myqtt_conn_set_on_close to get a notification just when the connection is lost.

References msg, myqtt_async_queue_new(), myqtt_async_queue_timedpop(), myqtt_conn_is_ok(), myqtt_msg_get_type_str(), myqtt_msg_unref(), myqtt_mutex_lock(), myqtt_mutex_unlock(), MYQTT_PINGREQ, MYQTT_PINGRESP, and MYQTT_QOS_0.