cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curlpp mailing list Archives

Re: [cURLpp] HeaderData Option

From: joza <joza420_at_yahoo.com>
Date: Wed, 13 Sep 2006 10:12:50 -0700 (PDT)

Hi Armel,

thanks for the hint. The functors indeed were introduced with version 0.6.0, so I have to do some redesign to my software. But, with the functors the whole approach is much "nicer" than the functions I had to use in version 0.5.0.

joza

Armel Asselin <asselin.armel_at_wanadoo.fr> wrote: Hello,
    I'm currently migrating my software from gcc 3.3.3, libcurl 7.11.0 and curlpp 0.5.0-rc6 to gcc 4.1.1, libcurl 7.15.5 and curlpp 0-7-0-pre2.

Since I have to parse the header lines received by a HTTP_REQUEST in my program, I used the "HeaderFunction" Option to set the function pointer and the "HeaderData" option to pass the data structure my callback function uses to store the header lines.
 In cURLpp, you use "functORS" not "functIONS". Basically, a functor is an object with an "operator( )" doing the job. The object holds all the data that you need (hence cURLpp uses the right cURL stuff to store the pointer in your back). So put your WriteFunction (or Header/ReadFunction) object and put state info inside.
  
 Armel
  
_______________________________________________
cURLpp mailing list
cURLpp_at_rrette.com
http://www.rrette.com/mailman/listinfo/curlpp

                 
---------------------------------
How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.

_______________________________________________
cURLpp mailing list
cURLpp_at_rrette.com
http://www.rrette.com/mailman/listinfo/curlpp
Received on 2006-09-13

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET