When the LwIP netconn_accept()
or netconn_recv()
function is called, if we are using a RTOS, it will block the thread and wait for a connection until timeout or forever, depends on the setting of LWIP_SO_RCVTIME0
. The timeout duration is equal to the SYS_ARCH_TIMEOUT
.
The SYS_ARCH_TIMEOUT
is defined as 0xffffffff in the core include part of the LwIP stack, so I think it is not expected to be changed.
Actually, I want it to check if a connection is made, if not then it continue the thread. However, if I call netconn_accept()
, it will just block the thread and wait there forever (or a very long time)...I don't want to jsut change the define value of SYS_ARCH_TIMEOUT
because I need different timeout in different situation...
What is the good way to do that? Thanks.
select
-like function? – Countryside