mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-02 07:55:46 +03:00
New functions coap_async_set_app_data2() coap_cache_set_app_data2() coap_context_set_app_data2() coap_session_set_app_data2() that, multi-thread safe, store an application data pointer and return the previous data pointer (if any). There is an optional callback that will be called when the respective storage object is released that can free off as appropriate the data that was stored. These replace the existing coap_*_set_app_data() functions and coap_*_get_app_data() can be used to get the stored data pointer.