Path: news.mathworks.com!newsfeed-00.mathworks.com!news.kjsl.com!newsfeed.stanford.edu!elk.ncren.net!newsflash.concordia.ca!canopus.cc.umanitoba.ca!tribune.usask.ca!support1.mathforum.org!not-for-mail
From: dreammissu <yushun1988829@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: go to next function in one callback?
Date: Tue, 22 Jul 2008 04:20:51 EDT
Organization: The Math Forum
Lines: 15
Message-ID: <8001046.1216714882627.JavaMail.jakarta@nitrogen.mathforum.org>
References: <g5n6am$78p$1@fred.mathworks.com>
NNTP-Posting-Host: nitrogen.mathforum.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: support1.mathforum.org 1216714882 14283 144.118.30.135 (22 Jul 2008 08:21:22 GMT)
X-Complaints-To: news@support1.mathforum.org
NNTP-Posting-Date: Tue, 22 Jul 2008 08:21:22 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:480851



This would set up network address, then to return to the kind of data transmission, is how the application of this » That this is the first to write themselves a callback function, and then set up the callback function to libcurl Curry, and then specify what kind of format to receive data, when libcurl to return to the data will set the callback function. Are as follows:
Callback function definitions:
size_t write_data (void * buffer, size_t size, size_t nmemb, void * userp);
Set up a callback function:
curl_easy_setopt (easyhandle, CURLOPT_WRITEFUNCTION, write_data);
Set up a callback function to receive the data format:
curl_easy_setopt (easyhandle, CURLOPT_WRITEDATA, & internal_struct);
 
Through the above settings, you can receive data to the callback function inside, then how is the kind libcurl command to start the download data or upload the data? » Below on the function curl_easy_perform, this function is to connect remote sites, began operating agreements related to the order, calling the examples are as follows:
success = curl_easy_perform (easyhandle);
 
Above through a series of calls, you can connect with the HTTP server and download the data and reached in the callback function. When finished using the library after this, do not forget to call functions curl_global_cleanup () to do the removal work.


[url=http://www.kakasoft.com/]file encryption[/url]