Mojo::WebSocketProxy::Backend
Abstract base class for RPC dispatch backends. See Mojo::WebSocketProxy::Backend::JSONRPC for the original JSON::RPC backend.
$class->register_type($type)
Registers that the invoking subclass implements an RPC backend of the given type.
$backend = Mojo::WebSocketProxy::Backend->new($type, %args)
Constructs a new instance of the subclass previously registered as handling the given type. Throws an exception of no such class exists.
These will be inherited by backend implementations and can be used for some common actions when processing requests and responses.
$backend = $class->new(%args)
Returns a new blessed HASH reference containing the given arguments.
Make RPC call params.
$backend->make_call_params($c, $req_storage)
Method params: stash_params - it contains params to forward from server storage.
Returns the stored callback for this response if we have one, otherwise an empty list.
Save RPC response to storage.
Make wsapi proxy server response from RPC response.
$f = $backend->call_rpc($c, $req_storage)
Invoked to actually dispatch a given RPC method call to the backend.
To install Mojo::WebSocketProxy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojo::WebSocketProxy
CPAN shell
perl -MCPAN -e shell install Mojo::WebSocketProxy
For more information on module installation, please visit the detailed CPAN module installation guide.