Synchronized messaging application framework server
Channel constructor.
Parameters
Adds client to the channel
Parameters
client
Client
Whether a client is joined this channel
Parameters
client
Returns boolean
Channel error
Client joined the channel
Client left the channel
Client has switched state
Properties
client
ClientnewState
string
An event has been scheduled
Properties
Server constructor
Parameters
Properties
embeddedTimeserver
boolean If set to true, an embedded timeserver will be launchedtimeserverHost
string Clients will connect to this timeserver if no timeserver specified for channeltimeserverPort
number Clients will connect to this timeserver if no timeserver specified for channel
URL of server's default timeserver (set via timeserverHost() and timeserverPort())
Returns string URL
Sets/gets whether client code is being served
Parameters
v
boolean whether to serve client code
Returns (Server | boolean) self when setting or value when getting
Sets/gets whether embedded timeserver is active
Parameters
v
boolean whether to activate integrated timeserver
Returns (Server | boolean) self when setting or value when getting
Sets/gets timeserver host to which clients will connect if no timeserver specified for channel
Parameters
v
string default host
Returns (Server | string) self when setting or value when getting
Sets/gets timeserver port to which clients will connect if no timeserver specified for channel
Parameters
v
number default port
Returns (Server | number) self when setting or value when getting
Attaches to a server or port
Parameters
Returns Server self
Creates a channel
Parameters
channelId
?string channel id or null. If null, then id will be generated
Returns ?Channel that has been created or null
Adds a client to a specific channel
Parameters
Returns boolean Operation result
Get specific channel
Parameters
channelId
Channel id
Returns ?Channel
Shuts down the server
Returns Server
Client has successfully connected
Client has disconnected