Observe examples

Client observes resources and receives notifications from server.

A CoAP client has observers that observe specific resources on the server. The server sends a notifications to the observer when the content of the resource is changed or when the max age period has elapsed. The max age of this resource is set to 10 seconds.

Request:

GET(Observe) coap://127.0.0.1:5692/resource1

PUT coap://127.0.0.1:5692/resource1

GET(Observe cancel) coap://127.0.0.1:5692/resource1

Notifications:

#[vars.received_notifications]