void myqtt_ctx_set_data_full ( MyQttCtx ctx,
const char *  key,
axlPointer  value,
axlDestroyFunc  key_destroy,
axlDestroyFunc  value_destroy 

Allows to store arbitrary data associated to the provided context, which can later retrieved using a particular key.

It is also possible to configure a destroy handler for the key and the value stored, ensuring the memory used will be deallocated once the context is terminated (myqtt_ctx_free) or the value is replaced by a new one.

ctxThe ctx where the data will be stored.
keyThe key to index the value stored. The key must be a string.
valueThe value to be stored. If the value to be stored is NULL, the function calls to remove previous content stored on the same key.
key_destroyOptional key destroy function (use NULL to set no destroy function).
value_destroyOptional value destroy function (use NULL to set no destroy function).

References myqtt_hash_remove(), and myqtt_hash_replace_full().

Referenced by myqtt_ctx_set_data(), myqtt_tls_init(), myqtt_tls_set_certificate(), and myqtt_web_socket_get_ctx().