How can a server tell if a client is gone?
Doug Rudoff
doug at ridley.coyote.trw.com
Wed Aug 29 03:47:34 AEST 1990
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 at mdi.com, uunet!mdisea!rudoff
=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
More information about the Comp.unix.questions
mailing list