Help with using server observable notifications #14
Labels
bug
Something isn't working
libcoap-parity
Features that libcoap offers, but libcoap-rs currently does not
Milestone
I'm trying to use server observable notifications, but I'm not sure how to do it.
The problem that I would like to solve is to change the data that is sent to the observers outside of the process loop (some other thread) and notify them using the
notify_observers
method.I'm starting with the following code mostly taken from the documentation:
The changes that I've made are creation of the resource with
notify_con=true
and call toresource.set_observe_notify_confirmable(true);
.The problem that I'm facing is that once I give ownership of the resource to the context through
context.add_resource(resource);
it is not possible to invokeresource.notify_observers()
since it is owned by the context.I wasn't able to find anything about the intended use in the documentation. What am I missing?
The text was updated successfully, but these errors were encountered: