You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Richard Williams <ri...@richardwilliams.co.nz> on 2010/04/09 07:19:37 UTC
Access to socket for tunnelled protocol
Hi,
I am writing some client code to tunnel a propriety protocol over
http/ssl optionally via a NTLMv2 proxy. I have the NTMLv2
authentication, working and I can successfully GET over https.
Now I want to get hold of the tunnelled socket so that I can
send/receive my full-duplex protocol. This looks easy to do in
HttpClient v3.x using the ProxyClient object (see below). How is this
achieved in HttpClient v4.1?
HttpClient-v3.x
ProxyClient.ConnectResponse response = proxyclient.connect();
Socket socket = response.getSocket();
HttpClient-v4.1
HttpResponse response = httpclient.execute(targetHost, httpget);
HttpEntity entity = response.getEntity(); // No Socket in here
Thanks,
Richard
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org
Re: Access to socket for tunnelled protocol
Posted by Oleg Kalnichevski <ol...@apache.org>.
On Fri, 2010-04-09 at 17:19 +1200, Richard Williams wrote:
> Hi,
>
> I am writing some client code to tunnel a propriety protocol over
> http/ssl optionally via a NTLMv2 proxy. I have the NTMLv2
> authentication, working and I can successfully GET over https.
>
> Now I want to get hold of the tunnelled socket so that I can
> send/receive my full-duplex protocol. This looks easy to do in
> HttpClient v3.x using the ProxyClient object (see below). How is this
> achieved in HttpClient v4.1?
>
> HttpClient-v3.x
> ProxyClient.ConnectResponse response = proxyclient.connect();
> Socket socket = response.getSocket();
>
> HttpClient-v4.1
> HttpResponse response = httpclient.execute(targetHost, httpget);
> HttpEntity entity = response.getEntity(); // No Socket in here
>
> Thanks,
> Richard
>
Richard
There is no direct equivalent of ProxyClient in HC 4.0 yet. All
components are there, though, so it should be trivial to put one
together.
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org