Class Guacamole.Tunnel
Defined in: Tunnel.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Core object providing abstract communication for Guacamole.
|
Field Attributes | Field Name and Description |
---|---|
The maximum amount of time to wait for data to be received, in
milliseconds.
|
|
<static> |
Guacamole.Tunnel.State
All possible tunnel states.
|
The current state of this tunnel.
|
Method Attributes | Method Name and Description |
---|---|
connect(data)
Connect to the tunnel with the given optional data.
|
|
Disconnect from the tunnel.
|
|
sendMessage(elements)
Send the given message through the tunnel to the service on the other
side.
|
Event Attributes | Event Name and Description |
---|---|
onerror(status)
Fired whenever an error is encountered by the tunnel.
|
|
oninstruction(opcode, parameters)
Fired once for every complete Guacamole instruction received, in order.
|
|
onstatechange(state)
Fired whenever the state of the tunnel changes.
|
Class Detail
Guacamole.Tunnel()
Core object providing abstract communication for Guacamole. This object
is a null implementation whose functions do nothing. Guacamole applications
should use Guacamole.HTTPTunnel instead, or implement their own tunnel based
on this one.
- See:
- Guacamole.HTTPTunnel
Field Detail
{Number}
receiveTimeout
The maximum amount of time to wait for data to be received, in
milliseconds. If data is not received within this amount of time,
the tunnel is closed with an error. The default value is 15000.
<static>
Guacamole.Tunnel.State
All possible tunnel states.
{Number}
state
The current state of this tunnel.
Method Detail
connect(data)
Connect to the tunnel with the given optional data. This data is
typically used for authentication. The format of data accepted is
up to the tunnel implementation.
- Parameters:
- {String} data
- The data to send to the tunnel when connecting.
disconnect()
Disconnect from the tunnel.
sendMessage(elements)
Send the given message through the tunnel to the service on the other
side. All messages are guaranteed to be received in the order sent.
- Parameters:
- {...} elements
- The elements of the message to send to the service on the other side of the tunnel.
Event Detail
onerror(status)
Fired whenever an error is encountered by the tunnel.
- Parameters:
- {Guacamole.Status} status
- A status object which describes the error.
oninstruction(opcode, parameters)
Fired once for every complete Guacamole instruction received, in order.
- Parameters:
- {String} opcode
- The Guacamole instruction opcode.
- {Array} parameters
- The parameters provided for the instruction, if any.
onstatechange(state)
Fired whenever the state of the tunnel changes.
- Parameters:
- {Number} state
- The new state of the client.