libcoap 4.3.5-develop-ea01661
Loading...
Searching...
No Matches
coap_async_internal.h
Go to the documentation of this file.
1/*
2 * coap_async_internal.h -- state management for asynchronous messages
3 *
4 * Copyright (C) 2010-2025 Olaf Bergmann <bergmann@tzi.org>
5 *
6 * SPDX-License-Identifier: BSD-2-Clause
7 *
8 * This file is part of the CoAP library libcoap. Please see README for terms
9 * of use.
10 */
11
17#ifndef COAP_ASYNC_INTERNAL_H_
18#define COAP_ASYNC_INTERNAL_H_
19
20#include "coap_internal.h"
21#include "coap_net.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27/* Note that if COAP_SERVER_SUPPORT is not set, then COAP_ASYNC_SUPPORT undefined */
28#if COAP_ASYNC_SUPPORT
29
39struct coap_async_t {
40 struct coap_async_t *next;
41 coap_tick_t delay;
43 coap_session_t *session;
44 coap_pdu_t *pdu;
45 void *app_data;
48};
49
70coap_async_t *coap_register_async_lkd(coap_session_t *session,
71 const coap_pdu_t *request,
72 coap_tick_t delay);
73
86int coap_check_async(coap_context_t *context, coap_tick_t now, coap_tick_t *tim_rem);
87
101coap_async_t *coap_find_async_lkd(coap_session_t *session, coap_bin_const_t token);
102
113void coap_async_trigger_lkd(coap_async_t *async);
114
127void coap_async_set_delay_lkd(coap_async_t *async, coap_tick_t delay);
128
147void *coap_async_set_app_data2_lkd(coap_async_t *async_entry,
148 void *data,
150
160void coap_free_async_lkd(coap_session_t *session, coap_async_t *async);
161
167void coap_delete_all_async(coap_context_t *context);
168
171#endif /* COAP_ASYNC_SUPPORT */
172
173#ifdef __cplusplus
174}
175#endif
176
177#endif /* COAP_ASYNC_INTERNAL_H_ */
struct coap_async_t coap_async_t
Async Entry information.
Pulls together all the internal only header files.
CoAP context interface.
uint64_t coap_tick_t
This data type represents internal timer ticks with COAP_TICKS_PER_SECOND resolution.
Definition coap_time.h:152
void(* coap_app_data_free_callback_t)(void *data)
Callback to free off the app data when the entry is being deleted / freed off.
CoAP binary data definition with const data.
Definition coap_str.h:67
The CoAP stack's global state is stored in a coap_context_t object.
structure for CoAP PDUs
Abstraction of virtual session that can be attached to coap_context_t (client) or coap_endpoint_t (se...