libcoap 4.3.1
coap_async.h
Go to the documentation of this file.
1/*
2 * coap_async.h -- state management for asynchronous messages
3 *
4 * Copyright (C) 2010-2022 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_H_
18#define COAP_ASYNC_H_
19
20#include "net.h"
21
37
58 const coap_pdu_t *request,
59 coap_tick_t delay);
60
71void
73
82void
84
92void
94
107
115void coap_async_set_app_data(coap_async_t *async, void *app_data);
116
124void *coap_async_get_app_data(const coap_async_t *async);
125
128#endif /* COAP_ASYNC_H_ */
uint64_t coap_tick_t
This data type represents internal timer ticks with COAP_TICKS_PER_SECOND resolution.
Definition: coap_time.h:127
void coap_free_async(coap_session_t *session, coap_async_t *async)
Releases the memory that was allocated by coap_register_async() for the object async.
Definition: coap_async.c:164
void coap_async_trigger(coap_async_t *async)
Trigger the registered async.
Definition: coap_async.c:101
coap_async_t * coap_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.
Definition: coap_async.c:39
void coap_async_set_delay(coap_async_t *async, coap_tick_t delay)
Update the delay timeout, so changing when the registered async triggers.
Definition: coap_async.c:114
void * coap_async_get_app_data(const coap_async_t *async)
Gets the application data pointer held in async.
Definition: coap_async.c:184
coap_async_t * coap_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 register...
Definition: coap_async.c:139
void coap_async_set_app_data(coap_async_t *async, void *app_data)
Set the application data pointer held in async.
Definition: coap_async.c:179
int coap_async_is_supported(void)
Returns 1 if libcoap was built with separate messages enabled, 0 otherwise.
Definition: coap_async.c:34
CoAP context interface.
CoAP binary data definition with const data.
Definition: str.h:64
structure for CoAP PDUs
Abstraction of virtual session that can be attached to coap_context_t (client) or coap_endpoint_t (se...