thr0w Class
This object provides the base functionality.
Item Index
Methods
- authenticated static
- connect static
- disconnect static
- getChannel static
- login static
- logout static
- setBase static
- thr0w static
- thr0wChannel static
Methods
authenticated
()
Boolean
static
This function returns if authenticated.
Returns:
Boolean:
If authenticated.
connect
(
static
-
chn -
connectCallback -
messageCallback
This function is used to connect to a channel.
Parameters:
-
chnIntegerThe channel id.
-
connectCallbackFunctionThe callback function called when connected.
function() -
messageCallbackFunctionThe callback function called for messages.
function(data) Parameters: data Object The message data.
disconnect
()
static
This function disconnects the channel.
getChannel
()
Integer
static
This function returns the channel number.
Returns:
Integer:
The channel number.
login
(
static
-
username -
password -
callback
This function logs in a user.
Parameters:
-
usernameStringThe user's name.
-
passwordStringThe user's password.
-
callbackFunctionThe function callback.
function(error) Parameters: error Integer The error code; null is success.
logout
()
static
This function logs out a user.
setBase
(
static
-
name
This function is used to set the hostname for the thr0w service.
Parameters:
-
nameStringThe hostname.
thr0w
(
static
-
channels -
data
This function is used send messages to channels.
Parameters:
-
channelsArrayArray of Integers; channel ids.
-
dataObjectThe message data.
thr0wChannel
(
static
-
channels -
data
This function is used to send messages via the channel.
Parameters:
-
channelsArrayArray of Integers; channel ids.
-
dataObjectThe message data.
