Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!wiley!news From: doug@ridley.coyote.trw.com (Doug Rudoff) Newsgroups: comp.unix.questions Subject: How can a server tell if a client is gone? Message-ID: <26DAAE36.74D6@wilbur.coyote.trw.com> Date: 28 Aug 90 17:47:34 GMT Sender: news@wilbur.coyote.trw.com (News Software) Reply-To: rudoff@mdi.com Organization: Mobile Data International Lines: 33 I am writing an application that uses a client-server model. I want the server to be able to tell if the client has disappeared unexpectedly. I have been using RPC for interprocess communication on a Sun3 and Sun4 running 4.0.3. What would be ideal would be an RPC call that tells you if a server's client still exists. In the not too descriptive man page on RPC, I don't see a function that does what I want. I did try having the client register an RPC service, and have the server every so often check to see if it could make a connection to the client's service (and then destroy the connection). This only worked if I used a tcp protocal (using udp, the server thought the client was there all the time, regardless of whether it was really there or not). However, after a couple of successful verifications of the client's presence, the server's call to clnt_create() would lock up in connect(). In reading the man page for connect(), I can't figure out why it would lock up. The problem of determining if a client still exists seems to me to be a common thing that needs to be done. Is there a simple way to do it with ANY type of IPC? Now, I am using RPC, but its underlying basis is sockets, so some help relating to sockets could be useful. Also, the Sun manuals on RPC leave a lot to be desired. Does anyone know of anything more informitive? (My most important question is what happens to a registed service if its process dies?) -- =-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Doug Rudoff Mobile Data International Bothell, WA (206) 487-5937 rudoff@mdi.com, uunet!mdisea!rudoff =-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-