yesodweb/wai — pull request #30 by BardurArantsson (2012-01-13 06:07:34+00:00)
Title: Add library interface

This adds an exported library interface to wai-eventsource. It should be pretty self-explanatory.

There is one exported module:

Network.Wai.EventSource

which exports the ServerEvent data type and a function

eventSourceApp :: Chan ServerEvent -> Application

which waits on the channel for ServerEvents to arrive and sends them out on the event source.