Re: SO_KEEPALIVE question
Re: SO_KEEPALIVE question
- Subject: Re: SO_KEEPALIVE question
- From: "Justin C. Walker" <email@hidden>
- Date: Wed, 28 Mar 2007 16:16:52 -0700
On Mar 28, 2007, at 15:51 , Dave Camp wrote:
I'm porting some code from Windows that uses the Windows equivalent
of ioctl to set the keepalive time for a TCP connection to 5
minutes. The usage in this case is an HTTP connection back to a
internet backup server. The client app is backing up files from the
users machine via HTTP (presumably because HTTP almost always makes
it through the firewall).
Looking through the Stevens UNP book, the closest thing I see is
SO_KEEPALIVE which is noted to be a system wide setting instead of
a per-socket setting.
Generally, socket options are kept per-socket. I think Stevens was
referring to the parameters that govern keepalives, not the enabling.
I also see some flamewars in the list archives about the use of
this setting. :-)
It's always been controversial, but let's not rehash that here :-}
What is the proper thing to do here? ifdef out that section of
code? Is there an equivalent setting I've missed?
You can use set/getsockopt() from user-mode code. It's probably best
to minimize porting hassles, rather than do it right :-}
Justin
--
Justin C. Walker, Curmudgeon-At-Large
Institute for the Absorption of Federal Funds
--------
Some people have a mental horizon of radius zero, and
call it their point of view.
-- David Hilbert
--------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden