Type Definition paho_mqtt3as_sys::MQTTAsync_connected [] [src]

type MQTTAsync_connected = Option<unsafe extern "C" fn(_: *mut c_void, _: *mut c_char)>;

This is a callback function, which will be called when the client library successfully connects. This is superfluous when the connection is made in response to a MQTTAsync_connect call, because the onSuccess callback can be used. It is intended for use when automatic reconnect is enabled, so that when a reconnection attempt succeeds in the background, the application is notified and can take any required actions. @param context A pointer to the context value originally passed to MQTTAsync_setCallbacks(), which contains any application-specific context. @param cause The reason for the disconnection. Currently, cause is always set to NULL.