[Twisted-Python] UDP with multiple connections

Christopher Armstrong radix at twistedmatrix.com
Thu Oct 11 16:04:48 EDT 2007

On 10/11/07, Simon Pickles <sipickles at hotmail.com> wrote:
> My problem is my app needs to be a server to many clients (thru TCP -
> twisted.protocols.basic) but a client to a further server, to which it
> passes occasional information.
> Is this possible through twisted, since I need two threads, one with the
> server reactor.run() and one with the client connection listenTCP()?

No you don't!

listenTCP does not block. You can have as many connections as you want
in a single reactor. Twisted is an *asynchronous* networking
framework. You don't need multiple threads for this use case.

Christopher Armstrong
International Man of Twistery

More information about the Twisted-Python mailing list