registerWebRPC
fn
void registerWebRPC(I)(URLRouter router, string path, I implementation,
WebRPCPeerCallback!I peer_callback) if (is(I == interface))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.
Parameters
router | The URLRouter on which to register the endpoint |
path | Path of the registered endpoint |
implementation | The API implementation to invoke for incoming method calls |
peer_callback | Callback invoked for each incoming connection |