void myqtt_conn_set_on_close_full2 ( MyQttConn connection,
MyQttConnOnClose  on_close_handler,
axl_bool  insert_last,
axlPointer  data 
)

Extended version for myqtt_conn_set_on_close handler which also support receiving a user data pointer.

See myqtt_conn_set_on_close for more details. This function could be called several times to install several handlers.

Once a handler is installed, you can use myqtt_conn_remove_on_close to uninstall the handler if it is required to avoid getting more notifications.

Parameters
connectionThe connection that is required to get close notifications.
on_close_handlerThe handler to be executed once the event is produced.
insert_lastAllows to configure if the handler should be inserted at the last position.
dataUser defined data to be passed to the handler.

References myqtt_mutex_lock(), and myqtt_mutex_unlock().