curl-library
Re: HTTP encapsulation with libcurl
Date: Wed, 17 Jun 2009 00:06:43 +0200 (CEST)
On Tue, 16 Jun 2009, Michael Koehler wrote:
> I am currently trying to communicate to a server using HTTP. I have to
> encapsulate the HTTP communication in another message-based protocol for the
> communication which requires me to receive the HTTP request created by curl
> as a string. The received string would then go into the tunnel protocol. The
> same counts for the HTTP response which I extract first from the other
> protocol before I can "hand it over" to libcurl.
Well, if that "other layer" is featured with sockets, you could use
CURLOPT_OPENSOCKETFUNCTION and have libcurl use it "by magic".
> Is there a way to perform this using libcurl? I had a look at all functions
> and options but could not find sth.
No, there isn't. And since libcurl and the protocols it supports is far away
from a single request that it could return in a single shot, I also find it
unlikely that we would come up with an easy way to provide what you ask for.
-- / daniel.haxx.seReceived on 2009-06-17