I have another silly question as a non-specialist regarding http and
networking...

What do I need a HttpConnectionManager for? What is the expensive thing of a
connection that it comes to a need for sharing? Why can't I just create
fresh connections all the time?

Others are much more qualified to answer this question, but in general I've found it both easier and high performing to use a connection manager.

For example, when a connection can be reused (you're making another request to the same server) then the connection mgr takes care of trying to reuse the connection for you, which is definitely a speed win.

Note that with the MultiThreadedHttpConnectionManager, you create one HttpClient, and then re-use it for all of your (multi-threaded) requests.

-- Ken
--
Ken Krugler
+1 530-210-6378

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to