[][src]Function paho_mqtt_sys::MQTTAsync_setDisconnected

pub unsafe extern "C" fn MQTTAsync_setDisconnected(
    handle: MQTTAsync,
    context: *mut c_void,
    co: MQTTAsync_disconnected
) -> c_int

Sets the MQTTAsync_disconnected() callback function for a client. @param handle A valid client handle from a successful call to MQTTAsync_create().

Note: Neither MQTTAsync_create() nor MQTTAsync_destroy() should be called within this callback. @param context A pointer to any application-specific context. The the context pointer is passed to each of the callback functions to provide access to the context information in the callback. @param co A pointer to an MQTTAsync_connected() callback function. NULL removes the callback setting. @return ::MQTTASYNC_SUCCESS if the callbacks were correctly set, ::MQTTASYNC_FAILURE if an error occurred.