3 # Copyright (c) Twisted Matrix Laboratories.
4 # See LICENSE for details.
6 from twisted.spread import pb
7 from twisted.internet import reactor
9 def one(port, user, pw, service, perspective, number):
10 factory = pb.PBClientFactory()
11 reactor.connectTCP("localhost", port, factory)
12 def1 = factory.getPerspective(
13 user, pw, service, perspective)
14 def1.addCallback(connected, number)
16 def connected(perspective, number):
17 print "got perspective ref:", perspective
18 print "asking it to foo(%d)" % number
19 perspective.callRemote("foo", number)
22 one(8800, "user1", "pass1", "service1", "perspective1.1", 10)
23 one(8800, "user1", "pass1", "service2", "perspective2.1", 11)
24 one(8800, "user2", "pass2", "service1", "perspective1.2", 12)
25 one(8800, "user2", "pass2", "service2", "perspective2.2", 13)
26 one(8801, "user3", "pass3", "service3", "perspective3.3", 14)