Deadpan-DDP-0.4.1.0: 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

runBareClient :: Params -> DeadpanApp a -> IO a Source

Run a DeadpanApp against a set of connection parameters

Only runs the app. Does not send connection request. Does not respond to ping!

runConnectClient :: Params -> DeadpanApp a -> IO a Source

Run a DeadpanApp after establishing a server conncetion

Does not respond to ping!

runPingClient :: Params -> DeadpanApp a -> IO a Source

Run a DeadpanApp after registering a ping handler, then establishing a server conncetion.

handlePings :: DeadpanApp () Source

Automatically respond to server pings

logEverything :: DeadpanApp (Chan String) Source

Log all incomming messages to STDOUT

Passes all messages through a Chan in order to not intermingle output lines.

Returns the chan so that it can be used by other sections of the app.

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.