cURL / Mailing Lists / curl-library / Single Mail


Re: using curl_easy_setopt() during a transfer

From: Daniel Stenberg <>
Date: Mon, 11 Oct 2010 16:22:59 +0200 (CEST)

On Mon, 11 Oct 2010, vineeth wrote:

> I had a doubt. Is it possible to perform a setopt() during the transfer in
> libcurl.

Yes it is, but don't count on the value you set to have any effect until the
next transfer.

> The scenario is as follows:
> * A file is being downloaded using multi interface.
> * A seek is needed and the download has to resume, say from 1024 offset
> from start.
> * Calling setopt(CURLOPT_RESUME_FROM, 1024) does not return a error code,
> however, the datastream does not move to the offset 1024.
> Is there anything else that needs to be done?

You should rather stop that transfer and request a new one from the desired
resume position.

List admin:
Received on 2010-10-11