Function paho_mqtt3as_sys::MQTTAsync_sendMessage
[−]
[src]
pub unsafe extern "C" fn MQTTAsync_sendMessage(
handle: MQTTAsync,
destinationName: *const c_char,
msg: *const MQTTAsync_message,
response: *mut MQTTAsync_responseOptions
) -> c_int
This function attempts to publish a message to a given topic (see also MQTTAsync_publish()). An ::MQTTAsync_token is issued when this function returns successfully. If the client application needs to test for successful delivery of messages, a callback should be set (see ::MQTTAsync_onSuccess() and ::MQTTAsync_deliveryComplete()). @param handle A valid client handle from a successful call to MQTTAsync_create(). @param destinationName The topic associated with this message. @param msg A pointer to a valid MQTTAsync_message structure containing the payload and attributes of the message to be published. @param response A pointer to an ::MQTTAsync_responseOptions structure. Used to set callback functions. @return ::MQTTASYNC_SUCCESS if the message is accepted for publication. An error code is returned if there was a problem accepting the message.