nng_mqtt_set_connect_cb - mqtt client connect callback function.
nng_mqtt_set_disconnect_cb - mqtt client disconnect callback function.
#include <nng/mqtt/mqtt_client.h>
int nng_mqtt_set_connect_cb(nng_socket s, nng_pipe_cb cb, void *arg);
int nng_mqtt_set_disconnect_cb(nng_socket s, nng_pipe_cb cb, void *arg);
nng_mqtt_set_xxx_cb()
functions register the callback function cb to be called after the connection was established or disconnected. The callback cb will be passed arg as its final argument.
nng_mqtt_msg_alloc(), nng_mqtt_msg_set_connect(), nng_pipe_notify(), nng_strerror(3), nng_url_parse(3), nng(7)