Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What exactly does SO_KEEPALIVE do?



What exactly does SO_KEEPALIVE do?..

Answer / chaitanya

The SO_KEEPALIVE option causes a packet (called a 'keepalive probe') to be sent to the remote system if a long time (by default, more than 2 hours) passes with no other data being sent or received. This packet is designed to provoke an ACK response from the peer. This enables detection of a peer which has become unreachable (e.g. powered off or disconnected from the net).

Note that the figure of 2 hours comes from RFC1122, "Requirements for Internet Hosts". The precise value should be configurable, but I've often found this to be difficult. The only implementation I know of that allows the keepalive interval to be set per-connection is SVR4.2.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Unix Socket Programming Interview Questions

Why do we need socket programming?

0 Answers  


Where can a get a library for programming sockets?

1 Answers  


How do I properly close a socket?

1 Answers  


over the socket? Is there a way to have a dynamic buffer? What does one do when one does not know how much information is coming?

1 Answers  


What is sae socket?

0 Answers  


What is socket programming in java?

0 Answers  


If bind() fails, what should I do with the socket descriptor?

1 Answers  


How can I be sure that UDP messages are received in order?

1 Answers  


Why do I get connection refused when the server is not running?

1 Answers  


How can I tell when a socket is closed on the other end?

0 Answers  


What is difference between socket () and serversocket () class?

0 Answers  


What is the difference between connected and unconnected sockets?

1 Answers  


Categories