subscribe.h
Go to the documentation of this file.
/*
* subscribe.h -- subscription handling for CoAP
* see RFC7641
*
* Copyright (C) 2010-2012,2014-2021 Olaf Bergmann <bergmann@tzi.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*
* This file is part of the CoAP library libcoap. Please see README for terms
* of use.
*/
#ifndef COAP_SUBSCRIBE_H_
#define COAP_SUBSCRIBE_H_
#define COAP_OBSERVE_ESTABLISH 0
#define COAP_OBSERVE_CANCEL 1
void coap_resource_set_get_observable(coap_resource_t *resource, int mode);
int
coap_resource_notify_observers(coap_resource_t *resource,
const coap_string_t *query);
#endif /* COAP_SUBSCRIBE_H_ */
coap_resource_notify_observers
int coap_resource_notify_observers(coap_resource_t *resource, const coap_string_t *query)
Initiate the sending of an Observe packet for all observers of resource, optionally matching query if...
coap_resource_set_get_observable
void coap_resource_set_get_observable(coap_resource_t *resource, int mode)
Set whether a resource is observable.
Definition: resource.c:1050
coap_resource_t
Abstraction of resource that can be attached to coap_context_t.
Definition: coap_resource_internal.h:42
coap_string_t
CoAP string data definition.
Definition: str.h:32