Synchronized messaging application framework client
Channel constructor
Parameters
connection
spec
Object Connection options
Subscribes for messages on given topic
.
Subscribing to topic #
will make you subscribe to any message in the channel.
Parameters
topic
stringprepareCallback
function (Any): Any The callback called during prepare transitionfireCallback
function (Any): Any The callback called during the 'fire' event
Publishes a user message to the channel
Parameters
Channel switched state
Properties
Error in channel
Synchronization with timeserver succeeded
Properties
error
number Reading's max variation from truth (ms)adjust
number Difference between local and remote clocks (ms)
Synchronization with timeserver failed
Properties
error
number Reading's max variation from truth (ms)adjust
number Difference between local and remote clocks (ms)
Creates new Connection
object
Parameters
uri
URI of SyncSocket server (e.g. http://localhost:5579)
Disconnects from the server
Attempt joining a channel with id channelId
.
Parameters
channelId
canPublish
Returns Promise Fulfilled promise returns the Channel
object, rejected — error message.
Client successfully connected to server
Connection error
Client disconnected from server
Error while connecting to server
Attempts connection to a SyncSocket server.
Parameters
uri
string Server URI
Returns Connection Connection
object.
Attempts connection to a SyncSocket server.
Parameters
uri
string Server URI
Returns Connection Connection
object.
Creates new Connection
object
Parameters
uri
URI of SyncSocket server (e.g. http://localhost:5579)
Disconnects from the server
Attempt joining a channel with id channelId
.
Parameters
channelId
canPublish
Returns Promise Fulfilled promise returns the Channel
object, rejected — error message.
Channel constructor
Parameters
connection
spec
Object Connection options
Subscribes for messages on given topic
.
Subscribing to topic #
will make you subscribe to any message in the channel.
Parameters
topic
stringprepareCallback
function (Any): Any -- The callback called during prepare transitionfireCallback
function (Any): Any -- The callback called during the 'fire' event
Publishes a user message to the channel
Parameters