pusher-ws-0.1.1.0: Implementation of the Pusher WebSocket protocol

Copyright(c) 2016 Michael Walker
LicenseMIT
MaintainerMichael Walker <mike@barrucadu.co.uk>
Stabilityexperimental
PortabilityOverloadedStrings
Safe HaskellNone
LanguageHaskell2010

Network.Pusher.WebSockets.Internal.Event

Description

Event handling. This is NOT considered to form part of the public API of this library.

Synopsis

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.

mapUsers :: Channel -> (HashMap Text Value -> HashMap Text Value) -> PusherClient () Source #

Apply a function to the users list of a presence channel