RELAY Client
Relay::Client is the basic connection to RELAY, allowing you send commands to RELAY and setup handlers for inbound events.
Constructor
Constructs a client object to interact with RELAY.
Parameters
Examples
Create a Client to interact with the RELAY API.
Properties
Methods
connect!
Starts the connection to the RELAY API. The connection to RELAY does not happen automatically so that you can setup handlers to events that might occur before the connection is successfully established.
Returns
Promise<void>
Examples
disconnect!
Disconnect the client from RELAY.
Returns
nil
Examples
on
Attach an event handler for a specific type of event.
Parameters
Returns
String - A low-level handler ID.
Examples
Subscribe to the ready event.
Events
All available events you can attach a listener on.