mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-24 15:57:14 +02:00
IDF release/v4.0 08219f3cf
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* subscribe.h -- subscription handling for CoAP
|
||||
* see draft-ietf-core-observe-16
|
||||
* see RFC7641
|
||||
*
|
||||
* Copyright (C) 2010-2012,2014-2015 Olaf Bergmann <bergmann@tzi.org>
|
||||
*
|
||||
@ -9,14 +9,16 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _COAP_SUBSCRIBE_H_
|
||||
#define _COAP_SUBSCRIBE_H_
|
||||
#ifndef COAP_SUBSCRIBE_H_
|
||||
#define COAP_SUBSCRIBE_H_
|
||||
|
||||
#include "address.h"
|
||||
#include "coap_io.h"
|
||||
#include "block.h"
|
||||
|
||||
/**
|
||||
* @defgroup observe Resource observation
|
||||
* API functions for interfacing with the observe handling (RFC7641)
|
||||
* @{
|
||||
*/
|
||||
|
||||
@ -53,20 +55,22 @@
|
||||
/** Subscriber information */
|
||||
typedef struct coap_subscription_t {
|
||||
struct coap_subscription_t *next; /**< next element in linked list */
|
||||
coap_endpoint_t local_if; /**< local communication interface */
|
||||
coap_address_t subscriber; /**< address and port of subscriber */
|
||||
coap_session_t *session; /**< subscriber session */
|
||||
|
||||
unsigned int non_cnt:4; /**< up to 15 non-confirmable notifies allowed */
|
||||
unsigned int fail_cnt:2; /**< up to 3 confirmable notifies can fail */
|
||||
unsigned int dirty:1; /**< set if the notification temporarily could not be
|
||||
* sent (in that case, the resource's partially
|
||||
* dirty flag is set too) */
|
||||
unsigned int has_block2:1; /**< GET request had Block2 definition */
|
||||
coap_block_t block2; /**< GET request Block2 definition */
|
||||
size_t token_length; /**< actual length of token */
|
||||
unsigned char token[8]; /**< token used for subscription */
|
||||
coap_string_t *query; /**< query string used for subscription, if any */
|
||||
} coap_subscription_t;
|
||||
|
||||
void coap_subscription_init(coap_subscription_t *);
|
||||
|
||||
/** @} */
|
||||
|
||||
#endif /* _COAP_SUBSCRIBE_H_ */
|
||||
#endif /* COAP_SUBSCRIBE_H_ */
|
||||
|
Reference in New Issue
Block a user