On Wed, Nov 18, 2015 at 8:55 AM, Glyph Lefkowitz <gl...@twistedmatrix.com> wrote:
> > > On Nov 15, 2015, at 9:54 AM, Itamar Turner-Trauring <ita...@itamarst.org> > wrote: > > > > On 11/15/2015 10:19 AM, Oon-Ee Ng wrote: > >> Based on my reading/searching, multiple reactors in the same process > >> (even in multiple threads) is pretty much a no-go because > >> twisted.internet.reactor is a global singleton. > >> > >> I'm also unable to find any information about connecting to self (for > >> example, to send messages from one reactor to itself). > >> > >> > > > > You can just have a single reactor. E.g. if you do a listenTCP (e.g. on > port 8080) on the reactor you can in the same process do a connectTCP to > localhost in the same process on the same reactor; just connect to > '127.0.0.1' or 'localhost' on port 8080. > > But of course you'd use < > https://twistedmatrix.com/documents/15.4.0/core/howto/endpoints.html>, > not 'listenTCP' and 'connectTCP' directly, right? :) > -glyph > > Glyph, the linked page: https://twistedmatrix.com/documents/15.4.0/core/howto/servers.html has endpoints example but the "Putting it All Together" still uses: reactor.listenTCP(8123, ChatFactory()) Wouldn't it be better if that was replaced, too? Or maybe both versions be visible on the same webpage? (one with listenTCP and one with endpoints)? Pantelis
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python