mirror of
https://github.com/obgm/libcoap.git
synced 2026-12-05 20:02:19 +03:00
Make max latency configurable
This commit is contained in:
1 parent
bbeb8c1d6a
commit
c63c8f7cb7
3 files changed
+10
No files matched your search
@@ -778,7 +778,9 @@ const char *coap_endpoint_str(const coap_endpoint_t *endpoint);
|
||||
* The MAX_LATENCY definition.
|
||||
* RFC 7252, Section 4.8.2 MAX_LATENCY is 100.
|
||||
*/
|
||||
#ifndef COAP_DEFAULT_MAX_LATENCY
|
||||
#define COAP_DEFAULT_MAX_LATENCY (100U)
|
||||
#endif /* COAP_DEFAULT_MAX_LATENCY */
|
||||
|
||||
/**
|
||||
* Set the CoAP initial ack response timeout before the next re-transmit
|
||||
|
||||
@@ -194,6 +194,7 @@ if(CONFIG_LIBCOAP)
|
||||
$<$<BOOL:${CONFIG_LIBCOAP_DEFAULT_MAX_PDU_RX_SIZE}>:COAP_DEFAULT_MAX_PDU_RX_SIZE=${CONFIG_LIBCOAP_DEFAULT_MAX_PDU_RX_SIZE}>
|
||||
$<$<BOOL:${CONFIG_LIBCOAP_RXBUFFER_SIZE}>:COAP_RXBUFFER_SIZE=${CONFIG_LIBCOAP_RXBUFFER_SIZE}>
|
||||
$<$<BOOL:${CONFIG_LIBCOAP_DEFAULT_MTU}>:COAP_DEFAULT_MTU=${CONFIG_LIBCOAP_DEFAULT_MTU}>
|
||||
$<$<BOOL:${CONFIG_LIBCOAP_DEFAULT_MAX_LATENCY}>:COAP_DEFAULT_MAX_LATENCY=${CONFIG_LIBCOAP_DEFAULT_MAX_LATENCY}>
|
||||
$<$<BOOL:${CONFIG_LIBCOAP_DEFAULT_SESSION_TIMEOUT}>:COAP_DEFAULT_SESSION_TIMEOUT=${CONFIG_LIBCOAP_DEFAULT_SESSION_TIMEOUT}>
|
||||
)
|
||||
|
||||
|
||||
@@ -216,6 +216,13 @@ config LIBCOAP_OBS_MAX_NON
|
||||
help
|
||||
Number of NON notifications before sending a CON (RFC7641 4.5).
|
||||
|
||||
config LIBCOAP_DEFAULT_MAX_LATENCY
|
||||
int "Default max latency in seconds"
|
||||
default 100
|
||||
help
|
||||
Maximum network latency used by CoAP timeout calculations.
|
||||
RFC7252 Section 4.8.2 specifies a default of 100 seconds.
|
||||
|
||||
config LIBCOAP_DEFAULT_SESSION_TIMEOUT
|
||||
int "Default session timeout"
|
||||
default 300
|
||||
|
||||
Reference in new issue
Block a user