libcoap  4.3.0
async.c File Reference

state management for asynchronous messages More...

+ Include dependency graph for async.c:

Go to the source code of this file.

Macros

#define SEARCH_PAIR(head, out, field1, val1, field2, val2, field3, val3)    SEARCH_PAIR3(head,out,field1,val1,field2,val2,field3,val3,next)
 
#define SEARCH_PAIR3(head, out, field1, val1, field2, val2, field3, val3, next)
 

Functions

int coap_async_is_supported (void)
 Returns 1 if libcoap was built with separate messages enabled, 0 otherwise. More...
 
coap_async_tcoap_register_async (coap_session_t *session, const coap_pdu_t *request, coap_tick_t delay)
 Allocates a new coap_async_t object and fills its fields according to the given request. More...
 
void coap_async_set_delay (coap_async_t *async, coap_tick_t delay)
 Update the delay timeout, so changing when the registered async triggers. More...
 
coap_async_tcoap_find_async (coap_session_t *session, coap_bin_const_t token)
 Retrieves the object identified by token from the list of asynchronous transactions that are registered with context. More...
 
static void coap_free_async_sub (coap_context_t *context, coap_async_t *s)
 
void coap_free_async (coap_session_t *session, coap_async_t *s)
 Releases the memory that was allocated by coap_register_async() for the object async. More...
 
void coap_delete_all_async (coap_context_t *context)
 Removes and frees off all of the async entries for the given context. More...
 
void coap_async_set_app_data (coap_async_t *async, void *app_data)
 Set the application data pointer held in async. More...
 
void * coap_async_get_app_data (const coap_async_t *async)
 Gets the application data pointer held in async. More...
 

Detailed Description

state management for asynchronous messages

Definition in file async.c.

Macro Definition Documentation

◆ SEARCH_PAIR

#define SEARCH_PAIR (   head,
  out,
  field1,
  val1,
  field2,
  val2,
  field3,
  val3 
)     SEARCH_PAIR3(head,out,field1,val1,field2,val2,field3,val3,next)

Definition at line 21 of file async.c.

◆ SEARCH_PAIR3

#define SEARCH_PAIR3 (   head,
  out,
  field1,
  val1,
  field2,
  val2,
  field3,
  val3,
  next 
)
Value:
do { \
LL_FOREACH2(head,out,next) { \
if ((out)->field1 == (val1) && (out)->field2 == (val2) && \
((val2) == 0 || memcmp((out)->field3, (val3), (val2)) == 0)) break; \
} \
} while(0)

Definition at line 24 of file async.c.

Function Documentation

◆ coap_free_async_sub()

static void coap_free_async_sub ( coap_context_t context,
coap_async_t s 
)
static

Definition at line 119 of file async.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: