/** * Connect via a proxy. * * @throws SocketException * @throws IOException */ private void connectViaProxy() throws NetworkException, SocketException, IOException { socket = newSocket(); if (Boolean.FALSE == protocol.isSecure()) { /* secure sockets must already be connected */ socket.connect(networkImpl.lookupSocketAddress(address), getConnectTimeout()); } }