home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / protocol / tcpip / 5085 < prev    next >
Encoding:
Text File  |  1992-11-08  |  2.1 KB  |  49 lines

  1. Newsgroups: comp.protocols.tcp-ip
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!news.columbia.edu!cunixb.cc.columbia.edu!ae2
  3. From: ae2@cunixb.cc.columbia.edu (Amiran Eliashvili)
  4. Subject: Re: FTP client source
  5. Message-ID: <1992Nov7.041430.13109@news.columbia.edu>
  6. Sender: usenet@news.columbia.edu (The Network News)
  7. Nntp-Posting-Host: cunixb.cc.columbia.edu
  8. Reply-To: ae2@cunixb.cc.columbia.edu (Amiran Eliashvili)
  9. Organization: Columbia University
  10. References: <1992Oct26.171556.625@mr.med.ge.com> <1992Oct30.111355.27732@andersen.co.uk>
  11. Date: Sat, 7 Nov 1992 04:14:30 GMT
  12. Lines: 35
  13.  
  14.  
  15. Hi all:
  16.  
  17. I have a rather specific question that have been intriguing me for
  18. few days now. I am trying to implement a fault tolerant system based
  19. on the Client/Server model. The nature of the system is to detect if
  20. either ends has been terminated. If it has been terminated abnormally
  21. the system will react accordingly.
  22.  
  23. I am using BSD sockets in order to establish a link between the server
  24. and the client, using SOCK_STREAM (TCP) as my protocol. I am able to
  25. detect when the other side has been terminated by a SIGKILL, SIGQUIT,
  26. as writing to the socket on the other side sends a SIGPIPE. Yet, when
  27. the machine has been turned off manually I don't get anything even
  28. though I have tried setting setsockopt(SO_KEEPALIVE)
  29.  
  30. [Man page exerb ]
  31.  
  32.      SO_KEEPALIVE enables the periodic transmission of messages on a
  33.      connected socket.  Should the connected party fail to respond to
  34.      these messages, the con- nection is considered broken.  A process
  35.      attempting to write to the socket receives a SIGPIPE signal and
  36.      the write opera- tion returns an error.  By default, a process
  37.      exits when it receives SIGPIPE.  A read operation on the socket
  38.      returns an error but does not generate SIGPIPE.
  39.  
  40.  
  41. to setsockopt(SO_LINGER) but none has worked for me. I was wondering
  42. if anyone else has encountered in the problem. If so how did you
  43. overcome it?
  44.  
  45. Any ideas or suggestions would be much appreciated.
  46.  
  47. Please mail to :  ae2@cunixa.cc.columbia.edu
  48. Thanks
  49.