@Override public void buildConnection() throws SocksException, IOException { if (inetAddress == null) { throw new IllegalArgumentException("Please set inetAddress before calling buildConnection."); } if (proxySocket == null) { proxySocket = createProxySocket(inetAddress, port); } else if (!proxySocket.isConnected()) { proxySocket.connect(new InetSocketAddress(inetAddress, port)); } SocksMethod method = socksMethodRequester.doRequest(acceptableMethods, proxySocket, SOCKS_VERSION); method.doMethod(this); }
@Override public void buildConnection() throws SocksException, IOException { if (inetAddress == null) { throw new IllegalArgumentException("Please set inetAddress before calling buildConnection."); } if (proxySocket == null) { proxySocket = createProxySocket(inetAddress, port); } else if (!proxySocket.isConnected()) { proxySocket.connect(new InetSocketAddress(inetAddress, port)); } SocksMethod method = socksMethodRequester.doRequest(acceptableMethods, proxySocket, SOCKS_VERSION); method.doMethod(this); }