[web-devel] WAI or Snap and the EventSource API

Chris Smith cdsmith at gmail.com
Sat Aug 27 16:42:08 CEST 2011


Hi Mathias,

I recently wrote exactly what you're looking for with Snap, and you can
get the code at

   https://github.com/cdsmith/gloss-web/blob/master/src/EventStream.hs

Let me know if that answers your question.  I imagine something
analogous would work with WAI, since I think it uses the same
enumerator/builder pattern; but I'm not familiar with the details of
WAI.

The key to writing the request incrementally is to set an enumerator
with appropriate flushing.

-- 
Chris Smith





More information about the web-devel mailing list