Safe Haskell | None |
---|
- 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 StringSource
kCometPlugin
provides the location of the Kansas Comet jQuery plugin.
getReply :: Document -> Int -> IO ValueSource
wait for a virtual-to-this-document's port numbers' reply.
eventQueue :: Document -> TChan ValueSource
Events being sent
debugDocument :: IO DocumentSource
Generate a Document
that prints what it would send to the server.