Portability | portable |
---|---|
Stability | experimental |
Maintainer | tanaka.hideyuki@gmail.com |
This module is server 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.Server add :: Int -> Int -> IO Int add x y = return $ x + y main = serve 1234 [("add", fun add)]
RPC method types
class RpcMethodType f whereSource
toRpcMethod :: f -> RpcMethodSource
OBJECT o => RpcMethodType (IO o) | |
(OBJECT o, RpcMethodType r) => RpcMethodType (o -> r) |
Create RPC method
fun :: RpcMethodType f => f -> RpcMethodSource
Create a RPC method from a Haskell function.