2
Long live,
Is it possible to obtain separate name resolution time from access time? The code I have is:
HttpURLConnection connection;
try {
URL endereco = new URL(url);
connection = (HttpURLConnection) endereco.openConnection();
...
it is possible to split openConnection in order to take times 1º of the resolution of the name to the DNS server and 2º the access time?
Thank you.
+1 - perfect, if parsing well the name resolution is not part of HTTP itself
– Bacco
Thank you, another question, when connect, it tb will not make the name resolution incorporated? Making with this solution the resolution 2x?
– Tomás Rodrigues
Not in this case, because the
inetAddress.getHostAddress()will return the host IP, and there will be no need for another name resolution.– Homer Simpson
my question was and when I asked:
connection = (HttpURLConnection) endereco.openConnection();
 ...
 BufferedInputStream inputStream = new BufferedInputStream(connection.getInputStream());I won’t be redoing the name resolution when connecting?– Tomás Rodrigues
It will not, because you are using the IP to make the connection.
– Homer Simpson
Thank you Henrique, reply accepted ;)
– Tomás Rodrigues