hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rafał Krupiński <ru...@post.pl>
Subject Re: Select which network adapter HttpClient should use
Date Sun, 30 Oct 2005 23:07:35 GMT
on Sun, 30 Oct 2005 16:37:05 -0500 Tony Spencer <tony.spencer@gmail.com> wrote:

> Does anyone know if there is anyway to specify which network adapter
> HttpClient should use?
> 
> In other words, if I have two network cards in a server and both are
> actively connected to a network could I choose which one I want to
> use?  (one of NetworkInterface.getNetworkInterfaces())

I think you should use
org.apache.commons.httpclient.HostConfiguration.setLocalAddress(InetAddress
localAddress)
method and pass the ip of your net iface.

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


Mime
View raw message