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[1], int(sys.argv[2]), stdioProxyFactory( ))
> and then call
> reactor.run( )
> Do you mean I can call reactor.connectTCP(sys.argv[1],
> int(sys.argv[2]), stdioProxyFactory( )) several times before calling
> reactor.run( ) ?

Yes, that's the idea.

> Then how my code determine which is the corresponding
> connection?

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.

-glyph
_______________________________________________
Twisted-Python mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to