On 5/12/19, Robert James <[email protected]> wrote:
> 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?
>


My error.  ChainedTunnel does fallback to HTTP; my testing was done incorrectly.
So I'll reduce my question to:
1. Is there a way to report this on the browser?
2. How can the server inform the browser of errors, especially if
using a WebSocket?

Reply via email to