From: rick.jones2@hp.com   
      
   Jorgen Grahn wrote:   
   > And implicit in your answer is this (correct me if I'm wrong): if   
   > someone pulls the plug on the client, the server isn't automatially   
   > going to notice. You need application activity for that.   
      
   Indeed application activity is the best way to clear-out connections.   
      
   Now, for completeness, there is in the TCP standard the concept of a   
   "keepalive probe" that TCP can be asked to emit after the connection   
   has been idle for some length of time. By default that is disabled   
   and the application must make a setsockopt() call to enable it. The   
   system-wide defaults on a 2.6.ish kernel visible in the output of   
   "sysctl -a | grep keep" If you tweak those you are affecting all   
   applications which are enabling TCP_KEEPALIVE. IIRC documented in the   
   Linux 2.6 tcp(7) manpage are some linux-specific setsockopt() calls an   
   application can make to alter the settings for a given connection.   
      
   Still, IMO and in the opinion of many others, it is best to use an   
   application-layer "are you still there" mechanism - the TCP_KEEPALIVE   
   mechanism by definition will not detect a present but hung application   
   because it never gets above TCP. Further, those linux-specific   
   per-connection setsockopt() calls are not portable.   
      
   rick jones   
   --   
   The glass is neither half-empty nor half-full. The glass has a leak.   
   The real question is "Can it be patched?"   
   these opinions are mine, all mine; HP might not want them anyway... :)   
   feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|