> My second question is in the funtion netconn_recv(). I don't use
socket, so when I want to receive data, netconn_recv() is been  
> called. In the funtion, first it asks a buf, then waits for data
coming forever. sometimes, I want to close the connect in another task,

>  but the funtion netconn_recv() doesn't return, and the buf doesn't
free forever!
 
You may not use a netconn from 2 different threads at the same time ->
receiving in one thread an closing from a second thread won't work
reliably.
 
Newer version of lwIP (CVS HEAD) have a new switch RECV_TIMEOUT (or
something like that) which enables you let netconn_recv return NULL
after a certain time of receiving nothing.
 
Simon
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to