I'm embedding Guacamole in a application, and would like to failover
from WS to HTTP, similar to Guacamole itself.  However, the nature of
the Javascript in guacamole-common-js seems to preclude this.

My use case is a failure in the server implementation of WebSockets.
(Catching the browser not supporting WebSockets is easy.)

1. We can't use ChainedTunnel: Testing shows that ChainedTunnel will
*not* failover if the server fails in the initial establishment of the
WS Tunnel.

2. We can't use try... catch: Testing shows that when
Guacamole.WebSocketTunnel gets server side errors (in initial
establishment), a message is outputted to the console, but no
exception is thrown.

So: How can we attempt WS, but, if it fails, even at the server side,
even at the initial connect, failover to HTTP?   Ideally, I'd also
like to display this in the browser, so we can debug.

A related problem: The guacamole-common Java code provides a method to
send an error from the HttpServlet, but doesn't seem to provide any
method to send an error to the browser from the WebSocketEndpoint.
How, in WS, can we tell the browser about a server error?

Reply via email to