<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Mar 18, 2012, at 1:36 AM, hz hanks wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Menlo; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: monospace; ">Thank you so much for your instant reply.<br><br>Sorry for my ignorance, but could you tell how to have several<br>reactor.connectTCP calls. From the textbook I'm reading, I just know<br>that I can<br>first call<br>reactor.connectTCP(sys.argv[1], int(sys.argv[2]), stdioProxyFactory( ))<br>and then call<br>reactor.run( )<br>Do you mean I can call reactor.connectTCP(sys.argv[1],<br>int(sys.argv[2]), stdioProxyFactory( )) several times before calling<br>reactor.run( ) ?</span></span></blockquote><div><br></div><div>Yes, that's the idea.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Menlo; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="font-family: monospace; ">Then how my code determine which is the corresponding<br>connection?</span></span></blockquote><br></div>Pass some arguments to stdioProxyFactory() and then you can refer to self.factory in your protocol. &nbsp;It should then be easy to figure out which one is which.<div><br></div><div>-glyph</div></body></html>