[][src]Function paho_mqtt_sys::MQTTAsync_send

pub unsafe extern "C" fn MQTTAsync_send(
    handle: MQTTAsync,
    destinationName: *const c_char,
    payloadlen: c_int,
    payload: *const c_void,
    qos: c_int,
    retained: c_int,
    response: *mut MQTTAsync_responseOptions
) -> c_int

This function attempts to publish a message to a given topic (see also ::MQTTAsync_sendMessage()). 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 payloadlen The length of the payload in bytes. @param payload A pointer to the byte array payload of the message. @param qos The @ref qos of the message. @param retained The retained flag for the message. @param response A pointer to an ::MQTTAsync_responseOptions structure. Used to set callback functions. This is optional and can be set to NULL. @return ::MQTTASYNC_SUCCESS if the message is accepted for publication. An error code is returned if there was a problem accepting the message.