
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. Cheers, Jasper