1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-26 06:53:52 +01:00

Merge pull request #12193 from leandrolanzieri/pr/gcoap/obs

gcoap: Add 'obs' attribute in example and extend documentation
This commit is contained in:
Sebastian Meiling 2019-10-31 18:14:23 +01:00 committed by GitHub
commit ca696f827b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -43,7 +43,7 @@ static const coap_resource_t _resources[] = {
};
static const char *_link_params[] = {
";ct=0;rt=\"count\"",
";ct=0;rt=\"count\";obs",
NULL
};

View File

@ -102,7 +102,7 @@
* ## Client Operation ##
*
* Client operation includes two phases: creating and sending a request, and
* handling the response aynchronously in a client supplied callback. See
* handling the response asynchronously in a client supplied callback. See
* `examples/gcoap/gcoap_cli.c` for a simple example of sending a request and
* reading the response.
*
@ -155,6 +155,13 @@
* take any action to support Observe client registration. However, gcoap
* limits registration for a given resource to a _single_ observer.
*
* It is [suggested] (https://tools.ietf.org/html/rfc7641#section-6) that a
* server adds the 'obs' attribute to resources that are useful for observation
* (i.e. will produce notifications) as a hint. Keep in mind that this is not
* mandatory in order to enable the mechanism in RIOT, nor will prevent a client
* from observing a resource that does not have this attribute in the link
* description.
*
* An Observe notification is considered a response to the original client
* registration request. So, the Observe server only needs to create and send
* the notification -- no further communication or callbacks are required.