You can use the Client object to build a messaging system into the browser.
Example usage:
Creates a new PubSub client.
SignalWire Chat token that can be obtained from the REST APIs.
Disconnect the client
Get channels allowed by the token
Publish a message to a channel
Subscribe to channels
Unsubscribe from channels
Replace the client token
Subscribe to an event
Subscribe to an event once
Unsubscribe from an event
Remove all event listeners