mirror of
https://github.com/obgm/libcoap.git
synced 2026-10-31 23:15:48 +03:00
If COAP_RESOURCE_MAX_SUBSCRIBER is > 0 coap_add_observer() now checks and returns NULL if COAP_RESOURCE_MAX_SUBSCRIBER is exceeded. net.c then detects this and respond. Per RFC7641 4.1. Request: A server that is unable or unwilling to add a new entry to the list of observers of a resource MAY silently ignore the registration request and process the GET request as usual. The resulting response MUST NOT include an Observe Option, the absence of which signals to the client that it will not be notified of changes to the resource and, e.g., needs to poll the resource for its state instead. Useful for constrained systems that wants to support observers but need to be mindful of memory usage.