hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tjmcsorley <...@TheMcSorleys.com>
Subject Example code NHTTPClient.java - how to determine local TCP port for a connection
Date Fri, 16 Nov 2007 18:28:50 GMT

I'm using the NHTTPClient.java example code to build a test harness to drive
a considerable load against a Web Server.  Some of the interactions are
exhibiting errors when the Web Server is stressed with many simultaneous
connections...   How can I extract the local TCP port from a connection so
that I can correlate this with a network capture and then isolate a
particular connection for analysis?

I've tried using the SessionRequest.getLocalAddress() method, however it is
always null...

Reading through the GuidedTourOfHttpCore wiki page I see that somehow I
should be able to use the HttpInetConnection interface to possibly
accomplish this.

But I don't see how to tie that into the NHTTPClient.java sample code. 
Could you please provide an example on how to do this?


- tom
View this message in context: http://www.nabble.com/Example-code-NHTTPClient.java---how-to-determine-local-TCP-port-for-a-connection-tf4822837.html#a13797997
Sent from the HttpComponents-Dev mailing list archive at Nabble.com.

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

View raw message