3 # Copyright (c) Twisted Matrix Laboratories.
4 # See LICENSE for details.
6 from twisted.spread import pb
7 from twisted.internet import reactor
9 class Two(pb.Referenceable):
10 def remote_print(self, arg):
11 print "two.print was given", arg
14 def __init__(self, two):
15 #pb.Root.__init__(self) # pb.Root doesn't implement __init__
17 def remote_getTwo(self):
18 print "One.getTwo(), returning my two called", self.two
20 def remote_checkTwo(self, newtwo):
21 print "One.checkTwo(): comparing my two", self.two
22 print "One.checkTwo(): against your two", newtwo
23 if self.two == newtwo:
24 print "One.checkTwo(): our twos are the same"
29 reactor.listenTCP(8800, pb.PBServerFactory(root_obj))