| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
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.
- runBareClient :: Params -> DeadpanApp a -> IO a
- runConnectClient :: Params -> DeadpanApp a -> IO a
- runPingClient :: Params -> DeadpanApp a -> IO a
- handlePings :: DeadpanApp ()
- logEverything :: DeadpanApp (Chan String)
- collectiveClient :: IO (AppState Callback)
- module Web.DDP.Deadpan.DSL
- module Web.DDP.Deadpan.Callbacks
- 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
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
module Web.DDP.Deadpan.DSL
module Web.DDP.Deadpan.Callbacks
module Control.Monad