[Twisted-Python] PB - detecting loss of connection

Richard.Townsend at edl.uk.eds.com Richard.Townsend at edl.uk.eds.com
Thu Jul 31 01:52:48 MDT 2003


I've been experimenting with PB. I have two applications developed from
examples pb3server.py and pb3client.py

The client uses pb.getObjectAt() to get a reference to the server's pb.Root
derived object. It then calls a remote method on that object to send a
pb.Referenceable object to the server.

The idea is that the server can then call a method on the pb.Referenceable
object to notify the client(s) whenever a significant change of state
occurs. This works OK.

If the client terminates, the server can trap pb.DeadReferenceError, so that
is not a problem.

However, if the server terminates (e.g. by SIGKILL) the client is not aware
that it will not receive any more updates.

Apart from periodically calling pb.getObjectAt() to see if the server is
still running, is there a way that the client can automatically detect if
the server has been terminated?

thanks for your help
 -Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20030731/5efbcbda/attachment.html>


More information about the Twisted-Python mailing list