msgpack-rpc-1.0.0: A MessagePack-RPC Implementation

Copyright(c) Hideyuki Tanaka, 2010-2015
LicenseBSD3
MaintainerHideyuki Tanaka <tanaka.hideyuki@gmail.com>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Network.MessagePack.Client

Contents

Description

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 :: Int -> Int -> Client Int
add = call "add"

main = runClient "localhost" 5000 $ do
  ret <- add 123 456
  liftIO $ print ret

Synopsis

MessagePack Client type

Call RPC method

call Source

Arguments

:: RpcType a 
=> String

Method name

-> a 

Call an RPC Method

RPC error

data RpcError Source

RPC error type

Constructors

ServerError Object

Server error

ResultTypeError String

Result type mismatch

ProtocolError String

Protocol error