3
# Copyright (c) 2009 Twisted Matrix Laboratories.
4
# See LICENSE for details.
6
from twisted.spread import pb
7
from twisted.internet import reactor
11
factory = pb.PBClientFactory()
12
reactor.connectTCP("localhost", 8800, factory)
13
factory.getRootObject().addCallback(foo.step1)
16
# keeping globals around is starting to get ugly, so we use a simple class
17
# instead. Instead of hooking one function to the next, we hook one method
25
print "got one object:", obj
27
print "asking it to getTwo"
28
self.oneRef.callRemote("getTwo").addCallback(self.step2)
31
print "got two object:", two
32
print "giving it back to one"
33
print "one is", self.oneRef
34
self.oneRef.callRemote("checkTwo", two)