<div class="gmail_quote">In our implementation of Comet we put the following:<br>basicTerminate<br> "This message is kind of a hack. It's goal is to escape from a 'block ensure' (more specifically, an 'error block ensure' ). 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> The method that this method hack, is Swazoo.HTTPConnection>>produceResponseFor: aSwazooTask, specifically to only do the following line (look <<):<br>Swazoo.HTTPConnection>>produceResponseFor: aSwazooTask<br>
{...}<br> SpExceptionContext <br> for: [aSwazooTask response:<br> (self server answerTo: aSwazooTask request). << THIS line<br> {..this code will not be executed...} ]<br>
on: Error <br> 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>
"<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"><<a href="mailto:cdrick65@gmail.com">cdrick65@gmail.com</a>></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"><<a href="mailto:renggli@gmail.com" target="_blank">renggli@gmail.com</a>></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>> Could someone (maybe Lukas) explain to me why does it need to do the<div><div></div><div class="Wj3C7c"><br>
> following lines(*) when a cometRequest is "delivered"?<br>
><br>
> (*)CTHandler>>basicTerminate<br>
> thisContext swapSender: nil.<br>
> 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't want: we don'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>