PubSub.Client
You can use the Client object to build a messaging system into the browser.
Example usage:
Constructor
Creates a new PubSub client.
Parameters
token
SignalWire Chat token that can be obtained from the REST APIs.
Methods
disconnect
Disconnect the client
getAllowedChannels
Get channels allowed by the token
publish
Publish a message to a channel
subscribe
Subscribe to channels
unsubscribe
Unsubscribe from channels
updateToken
Replace the client token
on
Subscribe to an event
once
Subscribe to an event once
off
Unsubscribe from an event
removeAllListeners
Remove all event listeners