Skip to content

Commit

Permalink
Persist observe: Support tracking observe information over server res…
Browse files Browse the repository at this point in the history
…tarts

Add in optional callbacks for when observe subscriptions start and stop.

Add in optional callbacks for when the observe counter is updated (can be
ratelimited) for a resource as well as track when a resource is deleted.

Add is support for new functions

coap_persist_observe() for server to add in tracked observe information.

coap_resource_set_observe_num() to update observe counter from tracked
information.

coap_observe_track() to define the optional callback functions.

coap-server has -t option to track observe information (most of the code
updates).

UDP sessions supported, as well as OSCORE over UDP.

Documentation updated
  • Loading branch information
mrdeep1 committed Feb 1, 2023
1 parent ba2fada commit 1b89eef
Show file tree
Hide file tree
Showing 16 changed files with 1,035 additions and 62 deletions.
4 changes: 2 additions & 2 deletions examples/coap-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ get_oscore_conf(void) {
/* Need a rw var to free off later and file_mem.s is a const */
buf = read_file_mem(oscore_conf_file, &length);
if (buf == NULL) {
fprintf(stderr, "OSCORE configuraton file error: %s\n", oscore_conf_file);
fprintf(stderr, "OSCORE configuration file error: %s\n", oscore_conf_file);
return NULL;
}
file_mem.s = buf;
Expand All @@ -808,7 +808,7 @@ get_oscore_conf(void) {
NULL, start_seq_num);
coap_free(buf);
if (oscore_conf == NULL) {
fprintf(stderr, "OSCORE configuraton file error: %s\n", oscore_conf_file);
fprintf(stderr, "OSCORE configuration file error: %s\n", oscore_conf_file);
return NULL;
}
return oscore_conf;
Expand Down
Loading

0 comments on commit 1b89eef

Please sign in to comment.