lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Handling ERR_MEM from tcp_close()


From: Sergio R. Caprile
Subject: Re: [lwip-users] Handling ERR_MEM from tcp_close()
Date: Fri, 18 Nov 2016 10:43:30 -0300
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

Too much code, I won't look at it.

From the wiki:
http://lwip.wikia.com/wiki/Raw/TCP

"The function may return ERR_MEM if no memory was available for closing the connection. If so, the application should wait and try again either by using the acknowledgment callback or the polling functionality. If the close succeeds, the function returns ERR_OK."

I use an extra CLOSING state, so the poll callback can kick in.
When closing, if close succeeds, state is CLOSED and everybody is happy. Otherwise, state is CLOSING and the poll callback will retry.



reply via email to

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