new StaticHTTPTunnel(urlnon-null, crossDomainopt, extraTunnelHeadersopt)
Guacamole Tunnel which replays a Guacamole protocol dump from a static file
received via HTTP. Instructions within the file are parsed and handled as
quickly as possible, while the file is being downloaded.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
url |
string | The URL of a Guacamole protocol dump. | ||
crossDomain |
boolean |
<optional> |
false | Whether tunnel requests will be cross-domain, and thus must use CORS mechanisms and headers. By default, it is assumed that tunnel requests will be made to the same domain. |
extraTunnelHeaders |
object |
<optional> |
{} | Key value pairs containing the header names and values of any additional headers to be sent in tunnel requests. By default, no extra headers will be added. |
- Source:
Extends
Members
(non-null) receiveTimeout :number
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.
Type:
- number
- Inherited From:
- Source:
(non-null) state :number
The current state of this tunnel.
Type:
- number
- Inherited From:
- Source:
(non-null) unstableThreshold :number
The amount of time to wait for data to be received before considering
the connection to be unstable, in milliseconds. If data is not received
within this amount of time, the tunnel status is updated to warn that
the connection appears unresponsive and may close. The default value is
1500.
Type:
- number
- Inherited From:
- Source:
uuid :string
The UUID uniquely identifying this tunnel. If not yet known, this will
be null.
Type:
- string
- Inherited From:
- Source:
Methods
connect(dataopt)
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:
Name | Type | Attributes | Description |
---|---|---|---|
data |
string |
<optional> |
The data to send to the tunnel when connecting. |
- Overrides:
- Source:
disconnect()
Disconnect from the tunnel.
- Overrides:
- Source:
isConnected() → (non-null) {boolean}
Returns whether this tunnel is currently connected.
- Inherited From:
- Source:
Returns:
true if this tunnel is currently connected, false otherwise.
- Type
- boolean
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:
Name | Type | Attributes | Description |
---|---|---|---|
elements |
* |
<repeatable> |
The elements of the message to send to the service on the other side of the tunnel. |
- Overrides:
- Source:
Events
onerror
Fired whenever an error is encountered by the tunnel.
Parameters:
Name | Type | Description |
---|---|---|
status |
Guacamole.Status | A status object which describes the error. |
- Inherited From:
- Source:
oninstruction
Fired once for every complete Guacamole instruction received, in order.
Parameters:
Name | Type | Description |
---|---|---|
opcode |
string | The Guacamole instruction opcode. |
parameters |
Array.<string> | The parameters provided for the instruction, if any. |
- Inherited From:
- Source:
onstatechange
Fired whenever the state of the tunnel changes.
Parameters:
Name | Type | Description |
---|---|---|
state |
number | The new state of the client. |
- Inherited From:
- Source:
onuuid
Fired when the UUID that uniquely identifies this tunnel is known.
Parameters:
Name | Type | Description |
---|---|---|
The |
string | UUID uniquely identifying this tunnel. |
- Inherited From:
- Source: