mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 21:27:40 +00:00
Implement nest instruction.
This commit is contained in:
@@ -270,6 +270,9 @@ Guacamole.Client = function(tunnel) {
|
|||||||
// No initial buffers
|
// No initial buffers
|
||||||
var buffers = [];
|
var buffers = [];
|
||||||
|
|
||||||
|
// No initial parsers
|
||||||
|
var parsers = [];
|
||||||
|
|
||||||
tunnel.onerror = function(message) {
|
tunnel.onerror = function(message) {
|
||||||
if (guac_client.onerror)
|
if (guac_client.onerror)
|
||||||
guac_client.onerror(message);
|
guac_client.onerror(message);
|
||||||
@@ -464,6 +467,21 @@ Guacamole.Client = function(tunnel) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getParser(index) {
|
||||||
|
|
||||||
|
var parser = parsers[index];
|
||||||
|
|
||||||
|
// If parser not yet created, create it, and tie to the
|
||||||
|
// oninstruction handler of the tunnel.
|
||||||
|
if (parser == null) {
|
||||||
|
parser = parsers[index] = new Guacamole.Parser();
|
||||||
|
parser.oninstruction = tunnel.oninstruction;
|
||||||
|
}
|
||||||
|
|
||||||
|
return parser;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handlers for all defined layer properties.
|
* Handlers for all defined layer properties.
|
||||||
* @private
|
* @private
|
||||||
@@ -747,6 +765,11 @@ Guacamole.Client = function(tunnel) {
|
|||||||
if (guac_client.onname) guac_client.onname(parameters[0]);
|
if (guac_client.onname) guac_client.onname(parameters[0]);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"nest": function(parameters) {
|
||||||
|
var parser = getParser(parseInt(parameters[0]));
|
||||||
|
parser.receive(parameters[1]);
|
||||||
|
},
|
||||||
|
|
||||||
"png": function(parameters) {
|
"png": function(parameters) {
|
||||||
|
|
||||||
var channelMask = parseInt(parameters[0]);
|
var channelMask = parseInt(parameters[0]);
|
||||||
|
Reference in New Issue
Block a user