private void closeConnection ( Session session , int guacamoleStatusCode , int webSocketCode ) { try { CloseCode code = CloseReason . CloseCodes . getCloseCode ( webSocketCode ) ; String message = Integer . toString ( guacamoleStatusCode ) ; session . close ( new CloseReason ( code , message ) ) ; } catch ( IOException e ) { logger . debug ( "Unable to close WebSocket connection." , e ) ; } }
Sends the numeric Guacaomle Status Code and Web Socket code and closes the connection .