title: LWIP + RTOS - how to avoid netconn block the thread forever?
body: <p>When the <strong>LwIP</strong> <code>netconn_accept()</code> or <code>netconn_recv()</code> 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 <code>LWIP_SO_RCVTIME0</code>. The timeout duration is equal to the <code>SYS_ARCH_TIMEOUT</code>.</p>
  
  <p>The <code>SYS_ARCH_TIMEOUT</code> is defined as <em>0xffffffff</em> in the core include part of the LwIP stack, so I think it is not expected to be changed.</p>
  
  <p>Actually, I want it to check if a connection is made, if not then it continue the thread. However, if I call <code>netconn_accept()</code>, 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 <code>SYS_ARCH_TIMEOUT</code> because I need different timeout in different situation...</p>
  
  <p>What is the good way to do that? Thanks.</p>