NAME
Mojo::WebSocketProxy::Dispatcher
DESCRIPTION
Using this module you can forward websocket JSON-RPC 2.0 requests to RPC server. See Mojo::WebSocketProxy for details on how to use hooks and parameters.
METHODS
open_connection
Run while opening new wss connection. Run hook when connection is opened. Set finish connection callback.
on_message
Handle message - parse and dispatch request messages. Dispatching action and forward to RPC server. Note that all incoming JSON messages are first normalised using NFC.
before_forward
Run hooks.
after_forward
Run hooks.
dispatch
Dispatch request using message json key.
forward
Forward call to RPC server using global and action hooks. Don't forward call to RPC if any before_forward hook returns response. Or if there is instead_of_forward action.
_get_error_details
Generates and returns a hash for error reporting
ok
SEE ALSO
Mojolicious::Plugin::WebSocketProxy, Mojo::WebSocketProxy, Mojo::WebSocketProxy::Backend, Mojo::WebSocketProxy::Dispatcher, Mojo::WebSocketProxy::Config Mojo::WebSocketProxy::Parser