Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype EventSource a = EventSource (IO a)
- class ToServerEvent a where
- toServerEvent :: a -> ServerEvent
- data ServerEvent
- = ServerEvent { }
- | CommentEvent { }
- | RetryEvent {
- eventRetry :: Int
- | CloseEvent
Documentation
newtype EventSource a Source #
EventSource (IO a) |
Instances
CanRespond (EventSource a :: Type) Source # | |
Defined in Web.Minion.Response.ServerEvent canRespond :: [ByteString] -> Bool # | |
(Monad m, ToServerEvent a) => ToResponse m (EventSource a) Source # | |
Defined in Web.Minion.Response.ServerEvent toResponse :: [ByteString] -> EventSource a -> m Response # |
class ToServerEvent a where Source #
toServerEvent :: a -> ServerEvent Source #
Instances
data ServerEvent #
Type representing a communication over an event stream. This can be an actual event, a comment, a modification to the retry timer, or a special "close" event indicating the server should close the connection.