From 15916dfbec8b1342157de41f59c810c2da63c9f3 Mon Sep 17 00:00:00 2001 From: xueyunfei Date: Thu, 14 May 2020 15:18:39 +0800 Subject: [PATCH] add LINGER to menuconfig --- components/lwip/Kconfig | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/components/lwip/Kconfig b/components/lwip/Kconfig index d6f2aa13f..b78790a1d 100644 --- a/components/lwip/Kconfig +++ b/components/lwip/Kconfig @@ -68,11 +68,14 @@ menu "LWIP" default n help Enabling this option allows SO_LINGER processing. - When close socket, the TCP connection will be immediately disconnected. - The unsent data in the send buffer will be discarded and an RST message - will be sent to the other party. It is worth noting that because of this way, - the abnormal handshake in 4 ends the TCP connection, the TCP connection will - not enter the 'TIME_WAIT' state. + l_onoff = 1,l_linger can set the timeout. + + If l_linger=0, When a connection is closed, TCP will terminate the connection. + This means that TCP will discard any data packets stored in the socket send buffer + and send an RST to the peer. + + If l_linger!=0,Then closesocket() calls to block the process until + the remaining data packets has been sent or timed out. config LWIP_SO_REUSE bool "Enable SO_REUSEADDR option"