Safe Haskell | None |
---|---|
Language | Haskell2010 |
MessagePack RPC Client based on WebSocket.
Synopsis
- data Config = Config {}
- type NotificationHandler = Client -> MethodName -> [Object] -> IO ()
- type RequestHandler = Client -> MessageId -> MethodName -> [Object] -> IO ()
- type Logger = String -> IO ()
- type Formatter = Message -> String
- defaultConfig :: Config
- data Backend = Backend {
- backendSend :: ByteString -> IO ()
- backendRecv :: IO ByteString
- backendClose :: IO ()
- type URL = String
- data Client
- withClient :: URL -> Config -> (Client -> IO a) -> IO a
- type Result = Either Object Object
- call :: Client -> MethodName -> [Object] -> IO Result
- reply :: Client -> MessageId -> Result -> IO ()
Config
Configuration for MessagePack RPC.
Config | |
|
type NotificationHandler = Client -> MethodName -> [Object] -> IO () #
Notification handler. The 3rd argument is response objects.
type RequestHandler = Client -> MessageId -> MethodName -> [Object] -> IO () #
Notification handler. The 2nd argument is message id to be used for replying. The 3rd argument is response objects.
type Logger = String -> IO () #
Logger type. Should print out the message passed as a first argument somewhere.
defaultConfig :: Config #
Backend
Backend IO functions.
Backend | |
|
Client
Executing the action in the 3rd argument with a Client
.