The URL of the WebSocket server to connect to.
Protected
callsProtected
currentIDProtected
eventsProtected
functionsProtected
userAuthorizes the connection with the given token.
The token to authorize the user with.
A promise that resolves with the user info if the user is authorized, or rejects if the user is not authorized.
Calls a method on the server.
The method to call on the server.
The parameters to pass to the method.
A promise that resolves with the result of the method call, or rejects if the method call fails (throws an exception, for example).
Protected
callRPCEstablishes a connection if not already connected.
A promise that resolves when the connection is successfully established, or rejects if the connection isn't correctly estabilished.
Protected
createCloses the connection to the server.
Returns the user info of the currently authorized user.
The user info of the currently authorized user, or undefined if not authorized.
Protected
initializeRegisters an event listener for the specified event name. The method will be called whenever the event is emitted by server.
The name of the event to listen for.
The callback function to be executed when the event is triggered.
A SignalConnection object that can be used to manage the connection.
Protected
onProtected
onRPCEventProtected
onRPCMessageProtected
onRPCResponseReconnects to the server.
A promise that resolves when the connection is successfully reestablished, or rejects if the connection isn't correctly reestablished
Registers a function with a given name. Server can use call
The name of the function to register.
The function to be registered, which can take any number of arguments and return any type.
Protected
sendProtected
sendProtected
send
Creates an instance of the RPC client.