Code example for HostNameResolver

Methods: resolve

0
		int soTimeout = HttpConnectionParams.getSoTimeout(params);
 
		InetSocketAddress remoteAddress;
		if (this.nameResolver != null) {
			remoteAddress = new InetSocketAddress(
					this.nameResolver.resolve(host), port);
		} else { 
			remoteAddress = new InetSocketAddress(host, port);
		} 
 
		sslsock.connect(remoteAddress, connTimeout);
 
		sslsock.setSoTimeout(soTimeout);
		try { 
			hostnameVerifier.verify(host, sslsock);
			// verifyHostName() didn't blowup - good! 
		} catch (IOException iox) {
			// close the socket before re-throwing the exception 
			try { 
				sslsock.close();
Connect your IDE to all the code out there  Get Codota for Java