[Twisted-Python] how to do server to server defined at runtime?

john nielsen jn at who.net
Fri Apr 23 08:53:31 MDT 2004


I am trying to figure out a way to have a server talk to another server, you do not know about except at runtime.
In other words, a client tells the server to talk to another server. I figured about the problem I had earlier,
and moving the connectTCP outside of PBServerFactory, fixes that problem, which makes sense since it is now not part of the reacotr. But, then I do not know how to specify who to talk to at runtime.

For example in this code, how to I move connectTCP into the adder class?

factory = pb.PBClientFactory()
reactor.connectTCP('localhost', 7001, factory)
d = factory.getRootObject()
reactor.listenTCP(port, pb.PBServerFactory(adder(d)))
reactor.run()

Thanks for any info,
john



-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm





More information about the Twisted-Python mailing list