
On Mon, Sep 26, 2011 at 12:15 AM, Jasper Van der Jeugt
Hi Michael,
I think my main question is: why take an enumerator? Should the function just run as an iteratee? I know that will make it much more amenable to integration with Warp. All of Warp's internal processing lives inside an Iteratee, so we can't really extract an Enumerator from there. This is already how Warp handles the request body (the application lives in an Iteratee), so I think the approach is sound.
You're right. I had this enumerator argument because initially it tied in better with my "demo" socket server. I've removed it, the type signature is now:
runWebSockets :: WebSockets a -> Iteratee ByteString IO () -> Iteratee ByteString IO a
This should work out better for Warp integration, if I understood you correctly.
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. I propose to expose such an iteratee through wai Request type.
Cheers, Jasper
_______________________________________________ web-devel mailing list web-devel@haskell.org http://www.haskell.org/mailman/listinfo/web-devel