<div class="gmail_quote">On Tue, Sep 27, 2011 at 4:33 PM, David Kao <span dir="ltr">&lt;<a href="mailto:a.libran@gmail.com">a.libran@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
When the call to listenTCP returns, is the server actively waiting for<br>
TCP connections?<br></blockquote><div>Looking at the code <a href="http://twistedmatrix.com/trac/browser/tags/releases/twisted-11.0.0/twisted/internet/tcp.py#L857">here</a>, I would think so.<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
Let&#39;s say reactor.run() has been called. Can I do the following back-to-back?<br>
<br>
reactor.listenTCP(4321, serverfactory)<br>
reactor.connectTCP(&quot;localhost&quot;, 4321, clientfactory) </blockquote><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Basically, I am almost starting a server and a client back-to-back<br>
that connects to each other.</blockquote><div>Just curious, why are you doing this?<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
 I would like to know if the server is in<br>
&quot;listening&quot; state before my client attempts to connect.<br>
<br>
Thanks.<br>
<br>
David Kao<br></blockquote><div><br>--Enrique <br></div></div>