Code example for Function

Methods: apply

0
               .getPort());
      Socket socket = null;
      try { 
         logger.trace("testing socket %s", socketAddress);
         socket = new Socket(
               proxyForURI.apply(URI.create("socket://" + socketA.getHostText() + ":" + socketA.getPort())));
         socket.setReuseAddress(false);
         socket.setSoLinger(false, 1);
         socket.setSoTimeout(timeout);
         socket.connect(socketAddress, timeout);
      } catch (IOException e) {
         return false; 
      } finally { 
         if (socket != null) {
            try { 
               socket.close();
            } catch (IOException ioe) {
               // no work to do 
            } 
         } 
Contextual code suggestions in your IDE  Get Codota for Java