cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curlpp mailing list Archives

[cURLpp] adding extra data

From: Wouter van Dongen <wvdongen_at_zonnet.nl>
Date: Fri, 15 Sep 2006 21:42:28 +0200

Hi,

 

I've got the following code in vb2005.net :

 

    Public Sub ThreadFunc()

 

            ThreadId

 

 

            Dim easy As Easy

            easy = New Easy()

 

            easy.SetOpt(CURLoption.CURLOPT_URL, doelUrl)

            easy.SetOpt(CURLoption.CURLOPT_WRITEFUNCTION, wf)

            easy.SetOpt(CURLoption.CURLOPT_POST, 1)

            easy.SetOpt(CURLoption.CURLOPT_SSL_VERIFYPEER, 1)

            easy.SetOpt(CURLoption.CURLOPT_POSTFIELDS, strPost)

 

            easy.Perform()

            easy.Cleanup()

        Next

    End Sub

 

This is where the response goes to:

 

    Public Function OnWriteData(ByVal buf() As Byte, ByVal size As Int32,
ByVal nmemb As Int32, ByVal extraData As Object) As Int32

        nrAangeroepen = nrAangeroepen + 1

        NotifyUI(System.Text.Encoding.UTF8.GetString(buf))

        Return size * nmemb

    End Function

 

Threadfunc is a function that is multi threaded (I used the examle
sharedemo.vb that comes with the zip file). I want to be able to let the
function onwritedata know from which thread the response comes from.

So when curl makes a perform the thread-id must be sent allong, When curl
calls OnwriteData with a response I know to wich thread the response
belongs. Please help!

 

 

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

These mail archives are generated by hypermail.

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

File upload with ASP.NET