lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] How do I close a socket/netconn TCP connection


From: Jan Menzel
Subject: Re: [lwip-users] How do I close a socket/netconn TCP connection
Date: Fri, 5 Aug 2016 23:45:10 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

Hi Simone!
        Many thanks for your response!

On 05.08.2016 20:13, address@hidden wrote:
> Jan Menzel:
>>     Whats the correct way to close a socket/netconn TCP connection
>> without
>> loosing any data in send window?
> 
> The correct way for (standard) sockets is to enable LINGER mode and call
> close() (read up on what linger is via google). Linger is supported by
> lwIP sockets, but unfortunately, there's no API for netconn. However,
> you can (for now) just change 'netconn->linger' to the number of seconds
> you want to wait.
> 
Great! Thats what I was looking for! I've just a single active TCP
connection, so I could also modify the default...

>>   I'm using an OS and version 1.4.1.
> 
> Unfortunately, 1.4.1 doesn't support linger.
> 
Actually I'm not on plain 1.4.1 but on GIT version from January 2015 to
have the unsend oversize missmatch assert fixed. Hopefully its supported
there, otherwise I'll have to upgrade to 2.0RC or port this part back.
(I'm on a quite small LPC1768 MCU with SSL layer and have almost no RAM
left. Therefore I'd to make some changes to the memory management,
especially with respect to error reporting, which might be a show stopper...

        Jan



reply via email to

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