[−][src]Function paho_mqtt_sys::MQTTAsync_setMessageArrivedCallback
pub unsafe extern "C" fn MQTTAsync_setMessageArrivedCallback(
handle: MQTTAsync,
context: *mut c_void,
ma: MQTTAsync_messageArrived
) -> c_int
This function sets the callback function for a message arrived event for a specific client. Any necessary message acknowledgements and status communications are handled in the background without any intervention from the client application. If you do not set a messageArrived callback function, you will not be notified of the receipt of any messages as a result of a subscription.
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 to the callback functions to provide access to the context information in the callback. @param ma A pointer to an MQTTAsync_messageArrived() callback function. You can set this to NULL if your application doesn't handle receipt of messages. @return ::MQTTASYNC_SUCCESS if the callbacks were correctly set, ::MQTTASYNC_FAILURE if an error occurred.