You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by John Walton <jk...@gmail.com> on 2009/04/30 17:26:11 UTC

how to set (local) source port?

I need to set the local source port on outbound connections with httpclient 4.0.

I can see the PlainSocketFactory includes the localport number in a
connectSocket call.

Can anyone help with any hints on how to get the local port set?

Thanks,
JW

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


Re: how to set (local) source port?

Posted by Oleg Kalnichevski <ol...@apache.org>.
John Walton wrote:
> I need to set the local source port on outbound connections with httpclient 4.0.
> 
> I can see the PlainSocketFactory includes the localport number in a
> connectSocket call.
> 
> Can anyone help with any hints on how to get the local port set?
> 
> Thanks,
> JW
>


Use 'http.route.local-address' parameter. For details see the section on 
  HTTP connection routing of the HttpClient tutorial:

http://wiki.apache.org/HttpComponents/HttpClientTutorial

Oleg

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 


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