Cause I need to close TCP task when I don't need it. I wanna use it's stack for other task. Now I write a route to release mem used by tcp task when I kill TCP task. 'cause not well test, it works not very well
[email protected] wrote: > > > tes_wzm wrote: >> I use lwip+ppp to send data to my tcp server. >> When sth occured, I want to close tcp thread. How can I do it? If I kill >> this thread through OS, it will leak some memory which use to create >> mailbox >> and sem. Is't some routes to release this memory? > > Shutting down lwIP is not supported as it is meant to run forever. If you > really need this, you must implement it on your own. Depending on why you > need to stop the thread, you could also just make sure you don't have any > other tasks running (netconn/socket API) and use tcpip_callback to call a > custom function that doesn't return (i.e. block on a semaphore) until the > thread should run again. > > The reason we haven't implemented graceful shutdown of the stack is that > it is not needed often and has negative impact (code size, testing, etc.) > on the rest of the stack even when not used. > > Simon > -- > Sicherer, schneller und einfacher. Die aktuellen Internet-Browser - > jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/chbrowser > > > _______________________________________________ > lwip-users mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/lwip-users > > -- View this message in context: http://old.nabble.com/How-to-close-tcp_thread-tp28065857p28287987.html Sent from the lwip-users mailing list archive at Nabble.com. _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
