Url of the server to be connected.
Get [[WebSocket]] object maintained by BridgeRpc object. BE CAREFUL to access this getter.
Close the connection.
A numeric value indicating the status code explaining why the connection is being closed. If this parameter is not specified, a default value of 1005 is assumed. See the list of status codes of CloseEvent for permitted values.
A human-readable string explaining why the connection is closing. This string must be no longer than 123 bytes of UTF-8 text (not characters).
Connect to the server. Suggest you register the handling methods before you call connect.
Call remote method without response.
The method name to be called.
Parameters to be sent.
An event listener to be called when the server is connected.
The event listener.
An event listener for [[WebSocket]] onmessage to handle BridgeRpc message.
Event object from WebSocket.onmessage
An event listener with method name to be called when received a notification.
The name of the method will be registered.
The event listener, no return value.
An event listener with method name to be called when received a request.
The name of the method will be registered.
The event listener, must returned a RpcResponse.
Call remote method.
The method name to be called.
Parameters to be sent.
Timeout of request operation, unit is millisecond.
Generated using TypeDoc
BridgeRpc is an Bridge RPC client can connect to Bridge RPC server and register methods and emit a request or a notification.