[−][src]Function paho_mqtt_sys::MQTTAsync_setConnectionLostCallback
pub unsafe extern "C" fn MQTTAsync_setConnectionLostCallback(
handle: MQTTAsync,
context: *mut c_void,
cl: MQTTAsync_connectionLost
) -> c_int
This function sets the callback function for a connection lost event for a specific client. Any necessary message acknowledgements and status communications are handled in the background without any intervention from the client application.
Note: The MQTT client must be disconnected when this function is called. @param handle A valid client handle from a successful call to MQTTAsync_create(). @param context A pointer to any application-specific context. The the context pointer is passed the callback functions to provide access to the context information in the callback. @param cl A pointer to an MQTTAsync_connectionLost() callback function. You can set this to NULL if your application doesn't handle disconnections. @return ::MQTTASYNC_SUCCESS if the callbacks were correctly set, ::MQTTASYNC_FAILURE if an error occurred.