<div class="gmail_quote">On Mon, Sep 26, 2011 at 12:15 AM, Jasper Van der Jeugt <span dir="ltr">&lt;<a href="mailto:m@jaspervdj.be">m@jaspervdj.be</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi Michael,<br>
<div class="im"><br>
&gt; I think my main question is: why take an enumerator? Should the<br>
&gt; function just run as an iteratee? I know that will make it much more<br>
&gt; amenable to integration with Warp. All of Warp&#39;s internal processing<br>
&gt; lives inside an Iteratee, so we can&#39;t really extract an Enumerator<br>
&gt; from there. This is already how Warp handles the request body (the<br>
&gt; application lives in an Iteratee), so I think the approach is sound.<br>
<br>
</div>You&#39;re right. I had this enumerator argument because initially it tied<br>
in better with my &quot;demo&quot; socket server. I&#39;ve removed it, the type<br>
signature is now:<br>
<br>
    runWebSockets :: WebSockets a<br>
<div class="im">                  -&gt; Iteratee ByteString IO ()<br>
                  -&gt; Iteratee ByteString IO a<br>
<br>
</div>This should work out better for Warp integration, if I understood you correctly.<br></blockquote><div><br></div><div><div>This still don&#39;t work with wai at the present, because there&#39;s no way to create the outer iteratee which is used to send data back to client directly.</div>

<div>I propose to expose such an iteratee through wai Request type.</div></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5"><br>
Cheers,<br>
Jasper<br>
<br>
_______________________________________________<br>
web-devel mailing list<br>
<a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/web-devel" target="_blank">http://www.haskell.org/mailman/listinfo/web-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><a href="http://www.yi-programmer.com/blog/">http://www.yi-programmer.com/blog/</a><br>