Safe Haskell | None |
---|---|
Language | Haskell2010 |
- connect :: Options -> (Document -> IO ()) -> ScottyM ()
- kCometPlugin :: IO String
- send :: Document -> Text -> IO ()
- data Document
- data Options = Options {}
- getReply :: Document -> Int -> IO Value
- eventQueue :: Document -> TChan Value
- debugDocument :: IO Document
- debugReplyDocument :: Document -> Int -> Value -> IO ()
- defaultOptions :: Options
Documentation
:: Options | URL path prefix for this page |
-> (Document -> IO ()) | called for access of the page |
-> ScottyM () |
connect "/foobar" (...) gives a scotty session that:
POST http://.../foobar/ <- bootstrap the interaction GET http://.../foobar/act/<id#>/<act#> <- get a specific action POST http://.../foobar/reply/<id#>/<reply#> <- send a reply as a JSON object
kCometPlugin :: IO String Source
kCometPlugin
provides the location of the Kansas Comet jQuery plugin.
getReply :: Document -> Int -> IO Value Source
wait for a virtual-to-this-document's port numbers' reply.
eventQueue :: Document -> TChan Value Source
Events being sent
debugDocument :: IO Document Source
Generate a Document
that prints what it would send to the server.