Thanks for you reply ! Basically, my host name resolution code needs to be called just before the Socket instance is created ...
what i've tried (and did not have time to test much yet, because it generated a whole set of changes on my side), is to change the instance variables of HttpConnection to "protected", in order to be able to override open() in an inheriting class. This creates code duplication (because open() has a lot of logic inside), but seems to provide the service. If there is another, more simple or proper way of doing that, i'd be happy to hear about it ;-) Thanks agin On 1/26/07, Roland Weber <[EMAIL PROTECTED]> wrote:
Hello Erwan, sorry for the late reply, we're currently a bit under water. > specific DNS server selected based on the URL requested or any other > parameter in the request > > I'm not sure i've made myself clear, but is there any other way i > could plug my own SocketFactory at the HttpConnection level ? I don't see how you could implement this requirement without changing the source code. Even in HttpClient 3.x, the transport layer is clearly separated from the HTTP layer. Even if you had a different socket factory per connection, you wouldn't have access to the request at the time the socket is connected. Things get worse in the presence of connection keep-alive. If I had to implement something like that, I'd probably start at the HttpMethodDirector and would try to do the hostname resolving there explicitly. By passing only IP-level addresses to the connection manager and connections, you prevent those from doing unwanted name resolutions. hope that helps, Roland --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
