44#ifndef COAP_TRANSACTIONS_H_
45#define COAP_TRANSACTIONS_H_
55#define COAP_RESPONSE_TIMEOUT_TICKS (1000 * COAP_RESPONSE_TIMEOUT)
56#define COAP_RESPONSE_TIMEOUT_BACKOFF_MASK (uint32_t)(((1000 * COAP_RESPONSE_TIMEOUT * ((float)COAP_RESPONSE_RANDOM_FACTOR - 1.0)) + 0.5) + 1)
59typedef struct coap_transaction {
60 struct coap_transaction *next;
63 coap_timer_t retrans_timer;
64 uint32_t retrans_interval;
65 uint8_t retrans_counter;
67 coap_endpoint_t endpoint;
69 coap_resource_response_handler_t callback;
77coap_transaction_t *coap_new_transaction(uint16_t mid,
const coap_endpoint_t *ep);
78void coap_send_transaction(coap_transaction_t *t);
79void coap_clear_transaction(coap_transaction_t *t);
80coap_transaction_t *coap_get_transaction_by_mid(uint16_t mid);
CoAP engine implementation.
An implementation of the Constrained Application Protocol (RFC 7252).
#define COAP_MAX_PACKET_SIZE
The max size of the CoAP messages.