3
# Copyright (c) 2009 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() called with", arg
15
factory = pb.PBClientFactory()
16
reactor.connectTCP("localhost", 8800, factory)
17
def1 = factory.getRootObject()
18
def1.addCallback(got_obj, two) # hands our 'two' to the callback
21
def got_obj(obj, two):
23
print "giving it our two"
24
obj.callRemote("takeTwo", two)