You need to create your own custom ProtocolSocketFactory[1] and implement the createSocket methods in the manner you mentioned. Once you do that, you need to tell HttpClient to use it. Something like this:

    if (shouldUseSocks) {
        Protocol.registerProtocol("http",
            new Protocol("http", new MyProtocolScoketFactory(), 80));
    }

[1] http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/protocol/ProtocolSocketFactory.html

Good luck.

-Alan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to