Chapter 2. API Reference
CONFIG_LWIP_TCP_MSL
Maximum segment lifetime (MSL)
Found in: Component config > LWIP > TCP
Set maximum segment lifetime in in milliseconds.
Default value:
• 60000
CONFIG_LWIP_TCP_SND_BUF_DEFAULT
Default send buffer size
Found in: Component config > LWIP > TCP
Set default send buffer size for new TCP sockets.
Per-socket send buffer size can be changed at runtime with lwip_setsockopt(s, TCP_SNDBUF, …).
This value must be at least 2x the MSS size, and the default is 4x the default MSS size.
Setting a smaller default SNDBUF size can save some RAM, but will decrease performance.
Range:
• from 2440 to 65535 if CONFIG_LWIP_WND_SCALE
• from 2440 to 1024000 if CONFIG_LWIP_WND_SCALE
Default value:
• 5744
CONFIG_LWIP_TCP_WND_DEFAULT
Default receive window size
Found in: Component config > LWIP > TCP
Set default TCP receive window size for new TCP sockets.
Per-socket receive window size can be changed at runtime with lwip_setsockopt(s, TCP_WINDOW, …
).
Setting a smaller default receive window size can save some RAM, but will significantly decrease per-
formance.
Range:
• from 2440 to 65535 if CONFIG_LWIP_WND_SCALE
• from 2440 to 1024000 if CONFIG_LWIP_WND_SCALE
Default value:
• 5744
CONFIG_LWIP_TCP_RECVMBOX_SIZE
Default TCP receive mail box size
Found in: Component config > LWIP > TCP
Set TCP receive mail box size. Generally bigger value means higher throughput but more
memory. The recommended value is: LWIP_TCP_WND_DEFAULT/TCP_MSS + 2, e.g. if
LWIP_TCP_WND_DEFAULT=14360, TCP_MSS=1436, then the recommended receive mail box
size is (14360/1436 + 2) = 12.
TCP receive mail box is a per socket mail box, when the application receives packets from TCP
socket, LWIP core firstly posts the packets to TCP receive mail box and the application then fetches
the packets from mail box. It means LWIP can caches maximum LWIP_TCP_RECCVMBOX_SIZE
packets for each TCP socket, so the maximum possible cached TCP packets for all TCP sockets is
Espressif Systems 1171
Submit Document Feedback
Release v4.4