private static void closeConnection(Connection connection,
            int guacamoleStatusCode, int webSocketCode) {

        connection.close(webSocketCode,
                Integer.toString(guacamoleStatusCode));

    }
Sends the given numeric Guacamole and WebSocket status
on the given WebSocket connection and closes the
connection.

@param connection
    The WebSocket connection to close.

@param guacamoleStatusCode
    The numeric Guacamole Status code to send.

@param webSocketCode
    The numeric WebSocket status code to send.
guacamole/src/main/java/org/apache/guacamole/tunnel/websocket/jetty8/GuacamoleWebSocketTunnelServlet.java