Copyright | (c) 2016 Michael Walker |
---|---|
License | MIT |
Maintainer | Michael Walker <mike@barrucadu.co.uk> |
Stability | experimental |
Portability | OverloadedStrings |
Safe Haskell | None |
Language | Haskell2010 |
Event handling. This is NOT considered to form part of the public API of this library.
- awaitEvent :: Connection -> IO (Either ByteString Value)
- handleEvent :: Pusher -> Either ByteString Value -> IO ()
- defaultHandlers :: [(Text, Value -> PusherClient ())]
- pingHandler :: Value -> PusherClient ()
- establishConnection :: Value -> PusherClient ()
- addChannel :: Value -> PusherClient ()
- addPresenceMember :: Value -> PusherClient ()
- rmPresenceMember :: Value -> PusherClient ()
- mapUsers :: Channel -> (HashMap Text Value -> HashMap Text Value) -> PusherClient ()
Documentation
awaitEvent :: Connection -> IO (Either ByteString Value) Source #
Block and wait for an event.
handleEvent :: Pusher -> Either ByteString Value -> IO () Source #
Launch all event handlers which are bound to the current event.
defaultHandlers :: [(Text, Value -> PusherClient ())] Source #
Default event handlers
pingHandler :: Value -> PusherClient () Source #
Immediately send a pusher:pong
establishConnection :: Value -> PusherClient () Source #
Record the activity timeout and socket ID.
addChannel :: Value -> PusherClient () Source #
Save the list of users (if there is one) and send the internal "pusher:subscription_succeeded" event.
addPresenceMember :: Value -> PusherClient () Source #
Record a presence channel user.
rmPresenceMember :: Value -> PusherClient () Source #
Remove a presence channel user.