lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Trouble with Socket remaining open when ethernet interr


From: Kieran Mansley
Subject: Re: [lwip-users] Trouble with Socket remaining open when ethernet interrupted
Date: Sat, 7 Jan 2012 16:08:16 +0000

On 6 Jan 2012, at 18:01, Brian Beatty wrote:

> Any advice? is there easy way to detect and close socket?

The sockets API is designed to be very tolerant of network outages, and survive 
them without the ends noticing.  There are mechanisms that you can use to make 
it less tolerant.  The most obvious (if you're using TCP) is the keepalive 
mechanism.  This involves TCP sending a heartbeat-style packet at the 
user-specified interval and if it doesn't get a response after a set number of 
attempts then it will timeout the socket and close it, returning an error to 
the application.  I think this is turned on by setting a socket option.

Kieran


reply via email to

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