|
From: | Carr, Anthony |
Subject: | [lwip-users] Problem with closing TCP socket |
Date: | Tue, 27 Nov 2012 15:40:15 +0000 |
Hi, I am using lwIP 1.3.1 and have developed an application which has been running successfully for several months. The application is a TCP server with the PC running as a client. I have recently discovered a problem if the communications link is broken, either at the unit end or the PC, my unit fails to reconnect with the host when the link is re-established. This seems to occur more readily if communications between the units was active at the time the link was broken. I have a background timer running checking for communications inactivity which closes the TCP connection after a period of no communications. Can anyone tell me how to correctly close the TCP connection cleanly, so that it can recover? I am calling tcp_close( pcb ) routine, is this correct? Why does the failure to reconnect seem to occur when communications are active? TJ
Anthony Carr
Principal Electronics Engineer
Unit D1, Grafton Way Basingstoke, Hampshire RG22 6HZ |
T: +44 (0)1256 467367 F: +44 (0)1256 840048 M: E: address@hidden |
This email contains confidential and/or privileged information belonging to Devlin Electronics Limited, its affiliates and/or subsidiaries. If you are not the intended reciient you are hereby notified that any disclosure, copying, distribution and/or the taking of any action based upon relieance on the contents of this transmission is strictly forbidden. If you have received this message in error; please notify the sender by retirun email and delete it from your system, If you require assistance please contact our sales office on +44 (0)1256 467367 or visit our website www.devlin.co.uk.
[Prev in Thread] | Current Thread | [Next in Thread] |