15 #ifndef _COAP_ASYNC_H_
16 #define _COAP_ASYNC_H_
59 #define COAP_ASYNC_CONFIRM 0x01
60 #define COAP_ASYNC_SEPARATE 0x02
61 #define COAP_ASYNC_OBSERVED 0x04
64 #define COAP_ASYNC_RELEASE_DATA 0x08
coap_tick_t created
Holds the internal time when the object was registered with a resource.
void * appdata
This field can be used to register opaque application data with the asynchronous state object...
unsigned char flags
holds the flags to control behaviour
coap_address_t peer
the peer to notify
coap_tid_t id
transaction id
void coap_ticks(coap_tick_t *)
Returns the current value of an internal tick counter.
Header structure for CoAP PDUs.
struct coap_async_state_t coap_async_state_t
coap_async_state_t * coap_register_async(coap_context_t *context, coap_address_t *peer, coap_pdu_t *request, unsigned char flags, void *data)
Allocates a new coap_async_state_t object and fills its fields according to the given request...
static void coap_touch_async(coap_async_state_t *s)
Updates the time stamp of s.
int coap_remove_async(coap_context_t *context, coap_tid_t id, coap_async_state_t **s)
Removes the state object identified by id from context.
coap_async_state_t * coap_find_async(coap_context_t *context, coap_tid_t id)
Retrieves the object identified by id from the list of asynchronous transactions that are registered ...
void coap_free_async(coap_async_state_t *state)
Releases the memory that was allocated by coap_async_state_init() for the object s.
unsigned short message_id
id of last message seen
size_t tokenlen
length of the token
unsigned char token[]
the token to use in a response
struct coap_async_state_t * next
internally used for linking
The CoAP stack's global state is stored in a coap_context_t object.