<div class="gmail_quote">On Mon, Sep 26, 2011 at 12:15 AM, Jasper Van der Jeugt <span dir="ltr"><<a href="mailto:m@jaspervdj.be">m@jaspervdj.be</a>></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>
> I think my main question is: why take an enumerator? Should the<br>
> function just run as an iteratee? I know that will make it much more<br>
> amenable to integration with Warp. All of Warp's internal processing<br>
> lives inside an Iteratee, so we can't really extract an Enumerator<br>
> from there. This is already how Warp handles the request body (the<br>
> application lives in an Iteratee), so I think the approach is sound.<br>
<br>
</div>You're right. I had this enumerator argument because initially it tied<br>
in better with my "demo" socket server. I've removed it, the type<br>
signature is now:<br>
<br>
runWebSockets :: WebSockets a<br>
<div class="im"> -> Iteratee ByteString IO ()<br>
-> 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't work with wai at the present, because there'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>