Portability | portable |
---|---|
Stability | experimental |
Maintainer | tanaka.hideyuki@gmail.com |
This module is client library of MessagePack-RPC. The specification of MessagePack-RPC is at http://redmine.msgpack.org/projects/msgpack/wiki/RPCProtocolSpec.
A simple example:
import Network.MessagePackRpc.Client add :: RpcMethod (Int -> Int -> IO Int) add = method "add" main = do conn <- connect "127.0.0.1" 1234 print =<< add conn 123 456
- data Connection
- connect :: String -> Int -> IO Connection
- data RpcError
- type RpcMethod a = Connection -> a
- call :: RpcType a => Connection -> String -> a
- method :: RpcType a => String -> RpcMethod a
RPC connection
data Connection Source
RPC connection type
RPC error
RPC error type
ServerError Object | An error occurred at server |
ResultTypeError String | Result type mismatch |
ProtocolError String | A protocol error occurred |
Call RPC method
type RpcMethod a = Connection -> aSource