Safe Haskell | None |
---|---|
Language | Haskell2010 |
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.
- runClient :: AppState Callback -> Params -> DeadpanApp a -> IO a
- runUnhookedClient :: AppState Callback -> Params -> DeadpanApp a -> IO a
- bareClient :: IO (AppState Callback)
- pingClient :: IO (AppState Callback)
- loggingClient :: IO (AppState Callback)
- collectiveClient :: IO (AppState Callback)
- module Control.Monad
- getURI :: String -> Either Error Params
- type Error = String
- type Params = (Domain, Port, Path)
- liftIO :: MonadIO m => forall a. IO a -> m a
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
module Control.Monad