curl-library
curl_easy_perform file descriptor position
Date: Wed, 1 Jan 2014 03:49:41 -0200
Hello everyone.
Just a beginners question, I want use a loop to get a file and parse
it repeatedly this way:
CURL *pt;
FILE *file;
file=fopen(fileName,"w+");
curl_global_init(CURL_GLOBAL_SSL);
curl_easy_setopt(pt,CURLOPT_URL,"https:site");
curl_easy_setopt(pt,CURLOPT_WRITEDATA,file);
while(1){
curl_easy_perform(pt);
parse(file); /parse function is ready to lead with any file
descriptor position
fseek(file,0,SEEK_SET); //for next call of curl_easy_perform
}
Is it necessary reset the file descriptor position to beginning with
fseek or the curl_easy_perform function do it already?
Regards
Rafael
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-01-01