home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / programm / 4269 < prev    next >
Encoding:
Internet Message Format  |  1992-08-12  |  1.9 KB

  1. Path: sparky!uunet!usc!sdd.hp.com!think.com!barmar
  2. From: barmar@think.com (Barry Margolin)
  3. Newsgroups: comp.unix.programmer
  4. Subject: Re: Socket breaking in mid transmission.
  5. Date: 13 Aug 1992 09:47:29 GMT
  6. Organization: Thinking Machines Corporation, Cambridge MA, USA
  7. Lines: 29
  8. Message-ID: <16db3hINNn2e@early-bird.think.com>
  9. References: <749@jahangir.UUCP>
  10. NNTP-Posting-Host: gandalf.think.com
  11. Keywords: TCP/IP sockets
  12.  
  13. In article <749@jahangir.UUCP> wayne@jahangir.UUCP (wayne) writes:
  14. >    The problem being... The mac tends to crash in the 
  15. >middle of a transmission. When this happens the sun 
  16. >takes a *long* time to recognize that the connection is 
  17. >broken. I suspect it's the mac's fault. Not closing it's
  18. >device drivers when it goes south. 
  19.  
  20. If the Mac has crashed, then it has no opportunity to close device drivers,
  21. since it just stops dead in its tracks.
  22.  
  23. If the Sun is transmitting when this happens, it will eventually time out
  24. waiting for an acknowledgement.  However, this takes a long time, because
  25. TCP connections are supposed to be resilient to temporary network problems
  26. (for instance, if a router goes down, it can sometimes take a couple of
  27. minutes for routing tables to stabilize with an alternate route).  There's
  28. no way to tell whether the ack timed out because the destination is dead or
  29. the network is disconnected, so it must make a conservative assumption.
  30.  
  31. If the Mac was transmitting when it crashed, then it's even harder to
  32. detect it, since there's no way to know why it isn't transmitting (unless
  33. your application is designed so that you can expect the Mac to send
  34. something periodically).  You could try turning SO_KEEPALIVE on, though;
  35. this causes the Sun to send an empty packet periodically, which should
  36. elicity an ack if the Mac is still up.
  37. -- 
  38. Barry Margolin
  39. System Manager, Thinking Machines Corp.
  40.  
  41. barmar@think.com          {uunet,harvard}!think!barmar
  42.