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

Classes

FakeSocket
class FakeSocket
Undocumented in source.

Mixin templates

ReceiveJSON
mixintemplate 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

interface IMyFuncs { void f(); }
class MyFuncs : IMyFuncs { void f() { return; }

// TCP sockets are the default - you don't have to name them explicitly...
auto server = new RPCServer!(MyFuncs, TCPListener!MyFuncs)
        ("127.0.0.1", 54321);
auto client = new RPCClient!(IMyFuncs, TCPTransport)
        ("127.0.0.1", 54321);

client.f();

Meta

Authors

Ryan Frame