You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Evert Hoff <ev...@pixie.co.za> on 2002/06/06 16:09:52 UTC

[HttpClient] New local port with each request

Hi,

Please explain to me the relationship between local ports and
connections. 

I have attached a Test program that downloads 4 files from Tomcat twice.
I am using the HttpMultiClient with the default settings, so only two
connections should be used.

But, the output of tcpdump (sniffer.log) shows that 8 different local
ports have been used (3106-3113) - one for each request that was made. I
would have expected just two local ports to be used.

My setup: 
192.168.0.1 - Windows 2002; Was running the Test program
192.168.0.2 - Linux; Was running Tomcat

The tcpdump command that I used on the linux machine was:
tcpdump -nli eth0 src host 192.168.0.1 and dst host 192.168.0.2 \
and dst port 8080 | tee /tmp/sniffer.log

I have very little understanding of this technology, so any help would
be appreciated.

Regards,

Evert