coap_async_internal.h
Go to the documentation of this file.
/*
* coap_async_internal.h -- state management for asynchronous messages
*
* Copyright (C) 2010-2021 Olaf Bergmann <bergmann@tzi.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*
* This file is part of the CoAP library libcoap. Please see README for terms
* of use.
*/
#ifndef COAP_ASYNC_INTERNAL_H_
#define COAP_ASYNC_INTERNAL_H_
#include "coap3/net.h"
#ifndef WITHOUT_ASYNC
struct coap_async_t {
struct coap_async_t *next;
coap_tick_t delay;
coap_session_t *session;
coap_pdu_t *pdu;
void* appdata;
};
coap_tick_t coap_check_async(coap_context_t *context, coap_tick_t now);
void
coap_delete_all_async(coap_context_t *context);
#endif /* WITHOUT_ASYNC */
#endif /* COAP_ASYNC_INTERNAL_H_ */
coap_tick_t
uint64_t coap_tick_t
This data type represents internal timer ticks with COAP_TICKS_PER_SECOND resolution.
Definition: coap_time.h:122
coap_check_async
coap_tick_t coap_check_async(coap_context_t *context, coap_tick_t now)
Checks if there are any pending Async requests - if so, send them off.
Definition: net.c:3199
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.
Definition: async.c:139
net.h
coap_async_t
Definition: coap_async_internal.h:33
coap_async_t::appdata
void * appdata
Definition: coap_async_internal.h:39
coap_async_t::session
coap_session_t * session
transaction session
Definition: coap_async_internal.h:37
coap_async_t::next
struct coap_async_t * next
internally used for linking
Definition: coap_async_internal.h:34
coap_async_t::pdu
coap_pdu_t * pdu
copy of request pdu
Definition: coap_async_internal.h:38
coap_async_t::delay
coap_tick_t delay
When to delay to before triggering the response 0 indicates never trigger.
Definition: coap_async_internal.h:35
coap_context_t
The CoAP stack's global state is stored in a coap_context_t object.
Definition: coap_net_internal.h:45
coap_pdu_t
structure for CoAP PDUs token, if any, follows the fixed size header, then options until payload mark...
Definition: coap_pdu_internal.h:94
coap_session_t
Abstraction of virtual session that can be attached to coap_context_t (client) or coap_endpoint_t (se...
Definition: coap_session_internal.h:48