Deadpan-DDP-0.2.0.1: Write clients for Meteor's DDP Protocol

Safe HaskellNone
LanguageHaskell2010

Web.DDP.Deadpan

Description

A collection of utilities to provide a way to create and run Deadpan apps.

This should be the only Deadpan module imported by users intending to use Deadpan as a library in order to write DDP applications.

Synopsis

Documentation

runClient :: AppState Callback -> Params -> DeadpanApp a -> IO a Source

Run a DeadpanApp against a set of connection parameters

Automatically spawns a background thread to respond to server messages using the callback set provided in the App State.

runUnhookedClient :: AppState Callback -> Params -> DeadpanApp a -> IO a Source

Run a DeadpanApp against a set of connection parameters

Does not register any callbacks to handle server messages automatically. This can be done with the setup function from Web.DDP.Deadpan.DSL.

Useful for running one-shot command-set applications... Not much else.

bareClient :: IO (AppState Callback) Source

A client that registers no initial callbacks Note: !!! This does not respond to ping, so you better perform your actions quickly!

pingClient :: IO (AppState Callback) Source

A client that only responds to pings so that it can stay alive

loggingClient :: IO (AppState Callback) Source

A client that logs all server sent messages, responds to pings

collectiveClient :: IO (AppState Callback) Source

A client that responds to server collection messages.

TODO: NOT YET IMPLEMENTED

liftIO :: MonadIO m => forall a. IO a -> m a

Lift a computation from the IO monad.