[Twisted-Python] Client to deal with multiple servers (Multiple Reactors?)
Hermínio Miguel Sanches
hsanches at gmail.com
Fri Jul 14 09:49:29 EDT 2006
Many Thanks Christopher for the quick answer
I was missing the point with two basic errors:
1) trying to connect multiple times(n) using reactor.connectTCP() with (n)
calls to reactor.run()
2) trying to instantiate only once the pb.PBClientFactory() for different
calls to reactor.connectTCP()
What I did was:
1) call only once reactor.run() after launching all the callbacks
2) instantiating pb.PBClientFactory() each time before a call to
reactor.connectTCP() (to change the server)
Please advise if I am doing something wrong.
On 7/14/06, Christopher Armstrong <radix at twistedmatrix.com> wrote:
> On 7/14/06, Hermínio Miguel Sanches <hsanches at gmail.com> wrote:
> > I am new to twisted and I am trying to implement a simple client that
> > to deal with several servers (windows platform).
> > I would like to send from the client asynchronous requests to all the
> > server, using TCP
> > I think that a solution would be to use a reactor per server connection
> > the client, but that does not seems possible as the reactor is a
> No, you don't use multiple reactors, you use one reactor and simply
> call connectTCP multiple times.
> Christopher Armstrong
> International Man of Twistery
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python