Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* keep-alive on tcp/ip-socket connections
@ 1996-10-21  4:00 Ole Joergensen
  1996-10-21  4:00 ` David P Cutter
  0 siblings, 1 reply; 4+ messages in thread
From: Ole Joergensen @ 1996-10-21  4:00 UTC (permalink / 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?





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1996-10-23  4:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-10-21  4:00 keep-alive on tcp/ip-socket connections Ole Joergensen
1996-10-21  4:00 ` David P Cutter
1996-10-22  4:00   ` Glen Turner
1996-10-23  4:00   ` Jeffrey Mogul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox