|
From: | Jan Menzel |
Subject: | [lwip-users] How do I close a socket/netconn TCP connection |
Date: | Fri, 5 Aug 2016 14:32:06 +0200 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
Hi all! Whats the correct way to close a socket/netconn TCP connection without loosing any data in send window? I'm using an OS and version 1.4.1. I've written some terminating message into the connection and now like to close and free it. Unfortunately a call to lwip_shutdown() seems to result in a RST with some data loss. The code I'm currently using calls lwip_shutdown() followed by lwip_close(). How do I wait for remaining data to be send out and then close the connection gracefully (I'd prefer to see FIN rather then RST). Thank You! Jan
[Prev in Thread] | Current Thread | [Next in Thread] |