registerWebRPC

Registers a route for handling incoming WebRPC requests.

The endpoint defined by path will attempt to establish a WebSocket connection with the client and subsequently enables bi-directional communication by listening for calls made by the client, as well as invoking the peer_callback to allow the server to make calls, too.

void
registerWebRPC
(
I
)
if (
is(I == interface)
)

Parameters

router URLRouter

The URLRouter on which to register the endpoint

path string

Path of the registered endpoint

implementation I

The API implementation to invoke for incoming method calls

peer_callback WebRPCPeerCallback!I

Callback invoked for each incoming connection

Meta