rpc.protocol.json

Json-Rpc 2.0 protocol implementation.

This module has 3 entry point:

  • RawJsonRpcAutoClient
  • HttpJsonRpcAutoClient
  • TcpJsonRpcAutoClient

Public Imports

rpc.core
public import rpc.core;

Members

Aliases

HttpJsonRpcClient
alias HttpJsonRpcClient(TId, TReq : JsonRpcRequest!TId = JsonRpcRequest!TId, TResp : JsonRpcResponse!TId = JsonRpcResponse!TId) = HttpRpcClient!(TId, TReq, TResp)

An http json-rpc client

IJsonRpcClient
alias IJsonRpcClient(TId, TReq : JsonRpcRequest!TId, TResp : JsonRpcResponse!TId) = IRpcClient!(TId, TReq, TResp)

Represents a Json rpc client.

IJsonRpcServer
alias IJsonRpcServer(TId, TReq : JsonRpcRequest!TId = JsonRpcRequest!TId, TResp : JsonRpcResponse!TId = JsonRpcResponse!TId) = IRpcServer!(TId, TReq, TResp)

Represents a Json rpc server.

JsonRpcRequestHandler
alias JsonRpcRequestHandler(TId, TReq = JsonRpcRequest!TId, TResp = JsonRpcResponse!TId) = RpcRequestHandler!(TReq, TResp)

Classes

HttpJsonRpcAutoClient
class HttpJsonRpcAutoClient(I)

Used to create an auto-implemented Http Rpc client from an interface.

HttpJsonRpcServer
class HttpJsonRpcServer(TId, TReq : JsonRpcRequest!TId = JsonRpcRequest!TId, TResp : JsonRpcResponse!TId = JsonRpcResponse!TId)

An http json-rpc client

JsonRpcAutoAttributeClient
class JsonRpcAutoAttributeClient(I)
JsonRpcAutoClient
class JsonRpcAutoClient(I, TId, TReq : JsonRpcRequest!TId = JsonRpcRequest!TId, TResp : JsonRpcResponse!TId = JsonRpcResponse!TId)

Base class for creating a Json RPC automatic client.

JsonRpcError
class JsonRpcError

Json-Rpc 2.0 error.

JsonRpcMethodException
class JsonRpcMethodException

Encapsulate a json-rpc error response.

JsonRpcRequest
class JsonRpcRequest(TId)

A Json-Rpc request that use TId as id type.

JsonRpcResponse
class JsonRpcResponse(TId)

A Json-Rpc response with an id of type TId.

JsonRpcUserException
class JsonRpcUserException

Exception to be used inside rpc handler, to throw user defined json-rpc error.

RawJsonRpcAutoClient
class RawJsonRpcAutoClient(I)

Used to create an auto-implemented raw Rpc client from an interface.

RawJsonRpcClient
class RawJsonRpcClient(TId, TReq : JsonRpcRequest!TId = JsonRpcRequest!TId, TResp : JsonRpcResponse!TId = JsonRpcResponse!TId)
RawJsonRpcServer
class RawJsonRpcServer(TId, TReq = JsonRpcRequest!TId, TResp = JsonRpcResponse!TId)
TcpJsonRpcAutoClient
class TcpJsonRpcAutoClient(I)

Used to create an auto-implemented Tcp Rpc client from an interface.

TcpJsonRpcClient
class TcpJsonRpcClient(TId, TReq : JsonRpcRequest!TId = JsonRpcRequest!TId, TResp : JsonRpcResponse!TId = JsonRpcResponse!TId)
TcpJsonRpcServer
class TcpJsonRpcServer(TId, TReq : JsonRpcRequest!TId = JsonRpcRequest!TId, TResp : JsonRpcResponse!TId = JsonRpcResponse!TId)

Functions

jsonRpcMethodHandler
JsonRpcRequestHandler!(TId, TReq, TResp) jsonRpcMethodHandler(T inst)

Return an handler to match a json-rpc request on an interface method.

Meta

License

Subject to the terms of the MIT license, as written in the included LICENSE.txt file.