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:
-
chn
IntegerThe channel id.
-
connectCallback
FunctionThe callback function called when connected.
function()
-
messageCallback
FunctionThe 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:
-
username
StringThe user's name.
-
password
StringThe user's password.
-
callback
FunctionThe 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:
-
name
StringThe hostname.
thr0w
(
static
-
channels
-
data
This function is used send messages to channels.
Parameters:
-
channels
ArrayArray of Integers; channel ids.
-
data
ObjectThe message data.
thr0wChannel
(
static
-
channels
-
data
This function is used to send messages via the channel.
Parameters:
-
channels
ArrayArray of Integers; channel ids.
-
data
ObjectThe message data.