[Twisted-Python] I want to use 2 reactors in same program, help me
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
On Tue, 23 Nov 2004 13:24:49 +0800, jacky lee <jagucpu@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
participants (2)
-
Christopher Armstrong
-
jacky lee