<div class="gmail_quote">In our implementation of Comet we put the following:<br>basicTerminate<br>&nbsp;&nbsp;&nbsp; &quot;This message is kind of a hack. It&#39;s goal is to escape from a &#39;block ensure&#39; (more specifically, an &#39;error block ensure&#39; ). This method will avoid to send a response into the browser and therefore we will have a live stream with the web browser.<br>
<br>&nbsp;&nbsp;&nbsp; The method that this method hack, is Swazoo.HTTPConnection&gt;&gt;produceResponseFor: aSwazooTask, specifically to only do the following line (look &lt;&lt;):<br>Swazoo.HTTPConnection&gt;&gt;produceResponseFor: aSwazooTask<br>
&nbsp;&nbsp;&nbsp; {...}<br>&nbsp;&nbsp;&nbsp; SpExceptionContext <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for: &nbsp;&nbsp;&nbsp; [aSwazooTask response:<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (self server answerTo: aSwazooTask request). &lt;&lt; THIS line<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {..this code will not be executed...} ]<br>
&nbsp;&nbsp;&nbsp; on: Error <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; do: [:ex | {..this code neither...}]<br>See this link for more information: <a href="http://www.nabble.com/Comet-and-CTHandler%3E%3EbasicTerminate-td22056942.html">http://www.nabble.com/Comet-and-CTHandler%3E%3EbasicTerminate-td22056942.html</a><br>
&quot;<br><br>I know this is hardcoded with Swazoo, but maybe is useful for somebody else.<br><br><br>2009/2/18 Cédrick Béler <span dir="ltr">&lt;<a href="mailto:cdrick65@gmail.com">cdrick65@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
sounds like a nice class comment for CTHandler ?<br><br><div class="gmail_quote"><div class="Ih2E3d">2009/2/17 Lukas Renggli <span dir="ltr">&lt;<a href="mailto:renggli@gmail.com" target="_blank">renggli@gmail.com</a>&gt;</span><br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>&gt; Could someone (maybe Lukas) explain to me why does it need to do the<div><div></div><div class="Wj3C7c"><br>
&gt; following lines(*) when a cometRequest is &quot;delivered&quot;?<br>
&gt;<br>
&gt; (*)CTHandler&gt;&gt;basicTerminate<br>
&gt; &nbsp; &nbsp; thisContext swapSender: nil.<br>
&gt; &nbsp; &nbsp; Processor activeProcess terminate<br>
<br>
</div></div></div><div><div></div><div class="Wj3C7c">This avoids that the stack to is unwound that that ensure blocks are executed.<br>
<br>
If that would not be done, then Seaside would generate an (empty)<br>
response and pass this response back to the web server. The web server<br>
would serialize this response onto the socket and flush and close the<br>
connection. These are all things that we don&#39;t want: we don&#39;t want a<br>
response to be created yet and we want the connection to stay open so<br>
that we can later stream contents to the other end. The above code<br>
makes that possible.<br>
<br>
Lukas<br>
<font color="#888888"><br>
--<br>
Lukas Renggli<br>
<a href="http://www.lukas-renggli.ch" target="_blank">http://www.lukas-renggli.ch</a><br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org" target="_blank">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</font></div></div></blockquote></div><br><br clear="all"><br>-- <br><font color="#888888">Cédrick<br>
</font><br>_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Luke LAut SkyFernadezWalker<br>