libcoap  4.3.0rc1
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)    SEARCH_PAIR2(head,out,field1,val1,field2,val2,next)
 
#define SEARCH_PAIR2(head, out, field1, val1, field2, val2, next)
 

Functions

coap_async_state_tcoap_register_async (coap_context_t *context, coap_session_t *session, 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. More...
 
coap_async_state_tcoap_find_async (coap_context_t *context, coap_session_t *session, coap_mid_t id)
 Retrieves the object identified by id from the list of asynchronous transactions that are registered with context. More...
 
int coap_remove_async (coap_context_t *context, coap_session_t *session, coap_mid_t id, coap_async_state_t **s)
 Removes the state object identified by id from context. More...
 
void coap_free_async (coap_async_state_t *s)
 Releases the memory that was allocated by coap_async_state_init() for the object s. More...
 
void coap_delete_all_async (coap_context_t *context)
 Removes and frees off all of the async entries for the given context. 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 
)     SEARCH_PAIR2(head,out,field1,val1,field2,val2,next)

Definition at line 19 of file async.c.

◆ SEARCH_PAIR2

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

Definition at line 22 of file async.c.

Function Documentation

◆ coap_delete_all_async()

void coap_delete_all_async ( coap_context_t context)

Removes and frees off all of the async entries for the given context.

Internal function.

Parameters
contextThe context to remove all async entries from.

Definition at line 109 of file async.c.

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