public SSLGuacamoleSocket(String hostname,int port) throws GuacamoleException {
  SocketFactory socket_factory=SSLSocketFactory.getDefault();
  try {
    logger.debug("Connecting to guacd at {}:{} via SSL/TLS.",hostname,port);
    SocketAddress address=new InetSocketAddress(InetAddress.getByName(hostname),port);
    sock=socket_factory.createSocket();
    sock.connect(address,SOCKET_TIMEOUT);
    sock.setSoTimeout(SOCKET_TIMEOUT);
    reader=new ReaderGuacamoleReader(new InputStreamReader(sock.getInputStream(),"UTF-8"));
    writer=new WriterGuacamoleWriter(new OutputStreamWriter(sock.getOutputStream(),"UTF-8"));
  }
 catch (  IOException e) {
    throw new GuacamoleServerException(e);
  }
}

public SSLGuacamoleSocket ( String hostname , int port ) throws GuacamoleException { SocketFactory socket_factory = SSLSocketFactory . getDefault ( ) ; try { logger . debug ( "Connecting to guacd at {}:{} via SSL/TLS." , hostname , port ) ; SocketAddress address = new InetSocketAddress ( InetAddress . getByName ( hostname ) , port ) ; sock = socket_factory . createSocket ( ) ; sock . connect ( address , SOCKET_TIMEOUT ) ; sock . setSoTimeout ( SOCKET_TIMEOUT ) ; reader = new ReaderGuacamoleReader ( new InputStreamReader ( sock . getInputStream ( ) , "UTF-8" ) ) ; writer = new WriterGuacamoleWriter ( new OutputStreamWriter ( sock . getOutputStream ( ) , "UTF-8" ) ) ; } catch ( IOException e ) { throw new GuacamoleServerException ( e ) ; } }
creates a new sslguacamolesocket which reads and writes instructions to the guacamole instruction stream of the guacamole proxy server running at the given hostname and port using ssl .
