private void closeConnection ( Session session , int guacamoleStatusCode , int webSocketCode ) { try { String message = Integer . toString ( guacamoleStatusCode ) ; session . close ( new CloseStatus ( webSocketCode , message ) ) ; } catch ( IOException e ) { logger . debug ( "Unable to close WebSocket connection." , e ) ; } }
Sends the given numeric Guacamole and WebSocket status codes on the given WebSocket connection and closes the connection .