[Twisted-Python] Problem about Multithread
glyph at twistedmatrix.com
Sun Mar 18 03:19:30 EDT 2012
On Mar 18, 2012, at 1:36 AM, hz hanks wrote:
> Thank you so much for your instant reply.
> Sorry for my ignorance, but could you tell how to have several
> reactor.connectTCP calls. From the textbook I'm reading, I just know
> that I can
> first call
> reactor.connectTCP(sys.argv, int(sys.argv), stdioProxyFactory( ))
> and then call
> reactor.run( )
> Do you mean I can call reactor.connectTCP(sys.argv,
> int(sys.argv), stdioProxyFactory( )) several times before calling
> reactor.run( ) ?
Yes, that's the idea.
> Then how my code determine which is the corresponding
Pass some arguments to stdioProxyFactory() and then you can refer to self.factory in your protocol. It should then be easy to figure out which one is which.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python