[Twisted-Python] I want to use 2 reactors in same program, help me
Christopher Armstrong
radeex at gmail.com
Mon Nov 22 23:12:15 MST 2004
On Tue, 23 Nov 2004 13:24:49 +0800, jacky lee <jagucpu at 126.com> wrote:
>
> My server used reactor to listen clients's requests.
> and at client side, I used reactor to connect to server
>
> Now I want to use 2 reactors in server side,
> the server will listen some clients's requests,
> and it will run a thread to connect to an other server,
> at the same time
Jacky,
You don't need to run a new reactor for every type of connection. You
can run connectTCP and listenTCP on the same reactor. You don't need
threads, and you don't need multiple reactors.
--
Twisted | Christopher Armstrong: International Man of Twistery
Radix | Release Manager, Twisted Project
---------+ http://radix.twistedmatrix.com
More information about the Twisted-Python
mailing list