title: How to use a custom socketfactory in Apache HttpComponents
body: <p>I have been trying to use a custom SocketFactory in the httpclient library from the Apache HTTPComponents project. So far without luck. I was expecting that I could just set a socket factory for a HttpClient instance, but it is obviously not so easy.</p>
  
  <p>The documentation for HttpComponents at <a href="http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html" rel="nofollow">http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html</a> does mention socket factories, but does not say how to use them. </p>
  
  <p>Does anybody know how this is done?</p>