mirror of
https://github.com/espressif/esp-lwip.git
synced 2025-08-06 18:23:42 +08:00
feat(tcp): make tcp rto configurable
This commit is contained in:
@ -1977,8 +1977,14 @@ tcp_alloc(u8_t prio)
|
|||||||
/* As initial send MSS, we use TCP_MSS but limit it to 536.
|
/* As initial send MSS, we use TCP_MSS but limit it to 536.
|
||||||
The send MSS is updated when an MSS option is received. */
|
The send MSS is updated when an MSS option is received. */
|
||||||
pcb->mss = INITIAL_MSS;
|
pcb->mss = INITIAL_MSS;
|
||||||
|
#if ESP_LWIP
|
||||||
|
/* make TCP's retransmission time to be configurable */
|
||||||
|
pcb->rto = LWIP_TCP_RTO_TIME / TCP_SLOW_INTERVAL;
|
||||||
|
pcb->sv = LWIP_TCP_RTO_TIME / TCP_SLOW_INTERVAL;
|
||||||
|
#else
|
||||||
pcb->rto = 3000 / TCP_SLOW_INTERVAL;
|
pcb->rto = 3000 / TCP_SLOW_INTERVAL;
|
||||||
pcb->sv = 3000 / TCP_SLOW_INTERVAL;
|
pcb->sv = 3000 / TCP_SLOW_INTERVAL;
|
||||||
|
#endif
|
||||||
pcb->rtime = -1;
|
pcb->rtime = -1;
|
||||||
pcb->cwnd = 1;
|
pcb->cwnd = 1;
|
||||||
pcb->tmr = tcp_ticks;
|
pcb->tmr = tcp_ticks;
|
||||||
|
@ -1534,6 +1534,11 @@
|
|||||||
#define LWIP_ALTCP_TLS 0
|
#define LWIP_ALTCP_TLS 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ESP_LWIP
|
||||||
|
#if !defined LWIP_TCP_RTO_TIME || defined __DOXYGEN__
|
||||||
|
#define LWIP_TCP_RTO_TIME 3000
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user