[Top][All Lists]

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

Re: [lwip-users] How to close tcp_thread

From: address@hidden
Subject: Re: [lwip-users] How to close tcp_thread
Date: Wed, 21 Apr 2010 17:27:47 +0200
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv: Gecko/20100317 Thunderbird/3.0.4

tes_wzm wrote:
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
Ehrm, is that suppposed to be a question? If so, I'm not sure what the answer is... :-)


address@hidden 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
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.

Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -
jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/chbrowser

lwip-users mailing list

reply via email to

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