From 85988d5a449e47cc6c709efdb58f3192c3399ab5 Mon Sep 17 00:00:00 2001 From: Mathieu Carbou Date: Sat, 27 Apr 2024 12:20:28 +0200 Subject: [PATCH] CONFIG_ASYNC_TCP_MAX_ACK_TIME --- src/AsyncTCP.cpp | 2 +- src/AsyncTCP.h | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/AsyncTCP.cpp b/src/AsyncTCP.cpp index 1a4e8bd..e048d58 100644 --- a/src/AsyncTCP.cpp +++ b/src/AsyncTCP.cpp @@ -581,7 +581,7 @@ AsyncClient::AsyncClient(tcp_pcb* pcb) , _tx_last_packet(0) , _rx_timeout(0) , _rx_last_ack(0) -, _ack_timeout(ASYNC_MAX_ACK_TIME) +, _ack_timeout(CONFIG_ASYNC_TCP_MAX_ACK_TIME) , _connect_port(0) , prev(NULL) , next(NULL) diff --git a/src/AsyncTCP.h b/src/AsyncTCP.h index b79afc0..7486f5e 100644 --- a/src/AsyncTCP.h +++ b/src/AsyncTCP.h @@ -69,9 +69,12 @@ extern "C" { #define CONFIG_ASYNC_TCP_QUEUE_SIZE 64 #endif +#ifndef CONFIG_ASYNC_TCP_MAX_ACK_TIME +#define CONFIG_ASYNC_TCP_MAX_ACK_TIME 5000 +#endif + class AsyncClient; -#define ASYNC_MAX_ACK_TIME 5000 #define ASYNC_WRITE_FLAG_COPY 0x01 //will allocate new buffer to hold the data while sending (else will hold reference to the data given) #define ASYNC_WRITE_FLAG_MORE 0x02 //will not send PSH flag, meaning that there should be more data to be sent before the application should react.