lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] How to close tcp_thread


From: Simon Goldschmidt
Subject: Re: [lwip-users] How to close tcp_thread
Date: Mon, 29 Mar 2010 10:21:54 +0200

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]