jsonrpc.transport

Network transport management implementation for JSON-RPC data.

You attach a transport to your RPCClient and a listener to your RPCServers, but you do not need to use the APIs directly.

Members

Mixin templates

ReceiveJSON
mixin template ReceiveJSON()

Receive a JSON object or array. Mixin template for transport implementations.

Structs

TCPListener
struct TCPListener(API)

Listen for incoming connections and pass clients to a handler function.

TCPTransport
struct TCPTransport

Manage TCP transport connection details and tasks.

Variables

isListener
enum bool isListener(T);

Check whether the specified object is a valid listener for RPCServers.

isTransport
enum bool isTransport(T);

Check whether the specified object is a valid transport for RPCClients.

Examples

1 interface IMyFuncs { void f(); }
2 class MyFuncs : IMyFuncs { void f() { return; }
3 
4 // TCP sockets are the default - you don't have to name them explicitly...
5 auto server = new RPCServer!(MyFuncs, TCPListener!MyFuncs)
6         ("127.0.0.1", 54321);
7 auto client = new RPCClient!(IMyFuncs, TCPTransport)
8         ("127.0.0.1", 54321);
9 
10 client.f();

Meta

Authors

Ryan Frame