commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maomaode <maoma...@gmail.com>
Subject Re: HttpClient: Socket(hostName,) or Socket(InetAddress,)
Date Fri, 09 Mar 2007 02:56:27 GMT
Hi,

I think it can improve the performance, when we do host lookup it 
require extra cost, if we can cache the hostname-ip map, then if there 
is same hostname, we can use ip directly, no dns resolve will be required.
I guess it improve the performance.


> Why?
>
>
> "Jakarta Commons Users List" <commons-user@jakarta.apache.org> wrote:
>
>   
>> Hi,
>>
>> I just noticed that in 
>> org/apache/commons/httpclient/protocol/DefaultProtocolSocketFactory
>>
>> we use the Socket(host, port), why not use Socket(InetAddress, port)
>>
>> I guess the the Socket(host, port) will eventually call 
>> Socket(InetAddress, port), right?
>> I think if we use Socket(InetAddress, port), can improve the productivity.
>>
>> thoughts?
>>
>> James.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>>
>>     
>
>
>
> -----------------------------------------------------------------
> Find the home of your dreams with eircom net property
> Sign up for email alerts now http://www.eircom.net/propertyalerts
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message