[web-devel] A WebSocket library

yi huang yi.codeplayer at gmail.com
Mon Sep 26 03:11:05 CEST 2011

On Mon, Sep 26, 2011 at 12:15 AM, Jasper Van der Jeugt <m at jaspervdj.be>wrote:

> 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
I propose to expose such an iteratee through wai Request type.

> Cheers,
> Jasper
> _______________________________________________
> web-devel mailing list
> web-devel at haskell.org
> http://www.haskell.org/mailman/listinfo/web-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20110926/7f1f2fe4/attachment.htm>

More information about the web-devel mailing list