|
From: | address@hidden |
Subject: | Re: [lwip-users] How do I close a socket/netconn TCP connection |
Date: | Fri, 5 Aug 2016 20:13:46 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 |
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.
I'm using an OS and version 1.4.1.
Unfortunately, 1.4.1 doesn't support linger. Simon
[Prev in Thread] | Current Thread | [Next in Thread] |