<DIV>hmmm... this was the trace output i got:</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp;</DIV>  <DIV>conn1 connection made. requesting session establishment ...<BR>conn2 connection made. requesting session establishment ...<BR>conn1 Server said: '\x82\x00\x00\x00'<BR>conn1 Positive Service Response Packet received!</DIV>  <DIV>...<BR>conn1 connection lost<BR>Connection lost - goodbye!<BR>numPorts = 1</DIV>  <DIV>&nbsp;</DIV>  <DIV>looks like connection 2 never got a response from the server, connection 1 completed its work (i did not put it into a continuous loop), but connection 2 seems to be hanged.</DIV>  <DIV>i'm running twist on windows XP.&nbsp; any hypothesis regarding connection 2?<BR><BR><B><I>Jean-Paul Calderone &lt;exarkun@divmod.com&gt;</I></B> wrote:</DIV>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">On Thu, 2 Feb 2006 12:37:17 -0800 (PST), john peter <NEUZHOUNDXX@YAHOO.COM>wrote:<BR>&gt;i'm writing an app that makes
 two twisted client connections to the same server.<BR>&gt; After each connection is made, each client connection sends a session<BR>&gt; establishment request to the server (per Netbios over TCP/IP protocol ) in the<BR>&gt; Protocol.connectionMade() method. In the dataReceived method, I check if my<BR>&gt; request was successful. If not successful, I display a failure notice then call self.transport.loseConnection(). if successful, I flip an internal variable "sessionEstablished" to true, then the intention is for the successful connection<BR>&gt; to continually interact with the server in a loop. this means, however, that i would get<BR>&gt; into a send-receive data loop, which as i've observed, would prevent the other successful connection to get any work done..<BR><BR>This is not the case. When you wish to send data, you call write on a transport. When data is received, your protocol's dataReceived method will be invoked with it. These actions are fairly common in all Twisted
 programs. They work just fine.<BR><BR>&gt; would it still be appropriate for me to use twisted for such application? if so, how should i approach the sendDataToServer() blocking. I'm read the docs on deferreds, but i'm still unsure how to proceed.<BR><BR>Why would sendDataToServer block? It should simply call write on a transport and then return.<BR><BR>Jean-Paul<BR><BR>_______________________________________________<BR>Twisted-Python mailing list<BR>Twisted-Python@twistedmatrix.com<BR>http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python<BR></BLOCKQUOTE>  <DIV><BR></DIV><p>
        
                <hr size=1> <a href="http://us.rd.yahoo.com/evt=38381/ ylc=X3oDMTEzcGlrdGY5BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDMWF1dG9z/*http://autos.yahoo.com/index.html ">Yahoo! Autos</a>. Looking for a sweet ride? Get pricing, reviews, & more on new and used cars.