cURL / Mailing Lists / curl-library / Single Mail


Re: About receiving data

From: Daniel Stenberg <>
Date: Wed, 2 Apr 2008 13:28:27 +0200 (CEST)

On Wed, 2 Apr 2008, Prasad J Pandit wrote:

> 1. How do I receive data? (considering, I'm not the one who opens the
> connection and have access to the socket)

You seem to have missed the tutorial:

and the examples:


> And secondly while sending data, my POST request url changes only by the
> resource name on the server, ie. my host remains same, as:
> +
> +
> Now can I, somehow, set a global host like CURLOPT_PORT and then everytime I
> do post I set the CURLOPT_URL to that resource name as "/file1/" or
> "/file2/" and expect libcurl to make it as: or

No. You need to construct the full URLs to pass to libcurl.

> Also, does libcurl opens new connection for every HTTP Get or Post I do, or
> how does it work?

If you re-use the easy handle libcurl will re-use connections as much as it

  Commercial curl and libcurl Technical Support:
Received on 2008-04-02