From: oj@dk-online.dk (Ole Joergensen)
Subject: keep-alive on tcp/ip-socket connections
Date: 1996/10/21 [thread overview]
Message-ID: <54fqd5$m4e@news.uni-c.dk> (raw)
Does anybody know how to control sending of 'keep-alives' on
tcp-connections
(OSF/1 - alpha platforms) ?
The problem arises when programming tcp at the socket-level (in C).
Consider, as an example, a proces running under OSF (on an alphabox)
which communicates with a proces running on (say) a PC via a connected
pair of tcp/ip-sockets.
If the pc is turned of (or explodes or whatever) the socket-software
on the PC won't have time to tell that it's going down and the
socket-software on the alphabox will not recieve any notification that
the connection is
broken.
To deal with this one needs to set up the tcp-connection so that it is
periodically probed
by sending 'keep-alives'. This is indeed possible in C, under OSF. In
the file
/usr/include/netinet/tcp_timers.h
two constants are defined:
#define TCPTV_KEEP_IDLE (120*60*PR_SLOWHZ) /* dflt time before probing
*/
#define TCPTV_KEEPINTVL ( 75*PR_SLOWHZ) /* default probe interval */
and this, as far as I understand, means that the first keep-alive will
be sendt
2 hours after establishing the connection, and then keep-alives will be
sendt every
75 seconds.
The question is then: How does one change this? How can you make the
probing start as soon
as the connection is established?
next reply other threads:[~1996-10-21 4:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-10-21 4:00 Ole Joergensen [this message]
1996-10-21 4:00 ` keep-alive on tcp/ip-socket connections David P Cutter
1996-10-22 4:00 ` Glen Turner
1996-10-23 4:00 ` Jeffrey Mogul
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox