mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-15 04:39:42 +03:00
net.h: Add in unknown_resource to coap_context_t
Needed to handle "RFC7252: 5.8.3. PUT If no resource exists, then the server MAY create a new resource with that URI, resulting in a 2.01 (Created) Response Code." Needed for support of PUT requests to an unknown resource. Remove structure coap_mid_cache_t as it is not used and refers to the now obsolete coap_key_t.
This commit is contained in:
1 parent
a674334afc
commit
cfe82719d3
1 file changed
+4
-7
+4
-7
@@ -88,16 +88,13 @@ typedef void (*coap_pong_handler_t)(struct coap_context_t *,
|
||||
coap_pdu_t *received,
|
||||
const coap_tid_t id);
|
||||
|
||||
#define COAP_MID_CACHE_SIZE 3
|
||||
typedef struct {
|
||||
unsigned char flags[COAP_MID_CACHE_SIZE];
|
||||
coap_key_t item[COAP_MID_CACHE_SIZE];
|
||||
} coap_mid_cache_t;
|
||||
|
||||
/** The CoAP stack's global state is stored in a coap_context_t object */
|
||||
typedef struct coap_context_t {
|
||||
coap_opt_filter_t known_options;
|
||||
struct coap_resource_t *resources; /**< hash table or list of known resources */
|
||||
struct coap_resource_t *resources; /**< hash table or list of known
|
||||
resources */
|
||||
struct coap_resource_t *unknown_resource; /**< can be used for handling
|
||||
unknown resources */
|
||||
|
||||
#ifndef WITHOUT_ASYNC
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user