lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] unpluging cable! how to close a socket cleanly?


From: fred
Subject: [lwip-users] unpluging cable! how to close a socket cleanly?
Date: Sun, 10 Feb 2013 03:37:55 -0800 (PST)

Hi Forum

i have a Problem using sockets in LWIP 1.1.1. My application is a server
which handles one socket connections.

I have the problem that when i unplug the cable during a datatransfer,
closing the socket fails. The problem occures when i plug the cabel back and
retry a connection this fails due to the one socket connection which is
already in use. 
Afer 1-4 minutes it is possible to reconnect to the socket again, due to i
guess keepalive option in the stack itself. 

The application stack which i use has a function close connections which
simply calls first lwip_recv() (i guess it checks if still data is
availible) and after that lwip_close(). But during debugging i see that the
stack hangs in the netcon_recv() and so blocks the stack.

Is there any way to close one or all sockets cleanly in lwip 1.1.1, without
waiting for the keepalive timeout ?

Regards
Fred



--
View this message in context: 
http://lwip.100.n7.nabble.com/unpluging-cable-how-to-close-a-socket-cleanly-tp21112.html
Sent from the lwip-users mailing list archive at Nabble.com.



reply via email to

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