rpc.core

Core functionnalities of the RPC framework.

Members

Aliases

RPCErrorHandler
alias RPCErrorHandler = void delegate(Exception e) @(safe)
Undocumented in source.
RPCRequestHandler
alias RPCRequestHandler(TRequest, TResponse) = void delegate(TRequest req, IRPCServerOutput!TResponse serv) @(safe)

A RPC request handler

rpcIdType
alias rpcIdType(T) = RPCIdTypeAttribute!T
Undocumented in source.

Classes

HttpRPCClient
class HttpRPCClient(TId, TRequest, TResponse)

Base implementation of an Http RPC client.

HttpRPCServer
class HttpRPCServer(TId, TRequest, TResponse)

An HTTP RPC server.

IdGenerator
class IdGenerator(TId : int)

An int id generator.

IdGenerator
class IdGenerator(TId : string)

A string id generator.

RPCException
class RPCException

Base class for RPC exceptions.

RPCInterfaceSettings
class RPCInterfaceSettings

RPC interface settings.

RPCNotConnectedException
class RPCNotConnectedException

Client not connected exception

RPCParsingException
class RPCParsingException

Parsing exception.

RPCTimeoutException
class RPCTimeoutException

RPC call timeout on client-side.

RawRPCClient
class RawRPCClient(TId, TRequest, TResponse)

A raw rpc client sending TRequest and receiving TResponse object through Input/Output stream.

RawRPCServer
class RawRPCServer(TId, TRequest, TResponse)
Undocumented in source.
UnhandledRPCMethod
class UnhandledRPCMethod

Unhandled RPC method on server-side.

Functions

noRpcMethod
NoRPCMethodAttribute noRpcMethod()

Methods marked with this attribute will not be treated as rpc endpoints.

rpcMethod
RPCMethodAttribute rpcMethod(string method)

Methods marked with this attribute will be treated as rpc endpoints.

rpcObjectParams
RPCMethodObjectParams rpcObjectParams(string[string] names)
Undocumented in source. Be warned that the author may not have intended to support it.
rpcObjectParams
RPCMethodObjectParams rpcObjectParams()
Undocumented in source. Be warned that the author may not have intended to support it.

Interfaces

IIdGenerator
interface IIdGenerator(TId)

Define an id generator.

IRPCClient
interface IRPCClient(TId, TRequest, TResponse)

An RPC client working with TRequest and TResponse.

IRPCRequest
interface IRPCRequest(TId)

An RPC request identified by an id.

IRPCResponse
interface IRPCResponse

An RPC response.

IRPCServer
interface IRPCServer(TId, TRequest, TResponse)

An RPC server that can register handler.

IRPCServerOutput
interface IRPCServerOutput(TResponse)

Represent server to client stream.

Structs

NoRPCMethodAttribute
struct NoRPCMethodAttribute
Undocumented in source.
RPCIdTypeAttribute
struct RPCIdTypeAttribute(T)

Allow to specify the id type used by some rpc protocol (like json-rpc 2.0)

RPCMethodAttribute
struct RPCMethodAttribute
Undocumented in source.
RPCMethodObjectParams
struct RPCMethodObjectParams

On a rpc method, when RPCMethodObjectParams.asObject is selected, this attribute is used to customize the name rendered for each arg in the params object.

Meta

License

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