curl_easy_perform(3)           libcurl 手册                  curl_easy_perform(3)

名字
curl_easy_perform - 执行一个阻塞文件传输
摘要
#include <curl/curl.h>
CURLcode curl_easy_perform(CURL *easy_handle);curl_easy_perform
描述
调用此函数后会默认调用curl_easy_init(3)和所有的curl_easy_setopt(3),并将执行所述选项中所述的传输。它必须被easy_handle作为输入的curl_easy_init相同(3)调用返回。curl_easy_perform(3)执行一个阻塞的方式和返回时完成整个请求,或者如果它失败了。非阻塞的行为,看到curl_multi_perform(3)。

你可以做任何数量的要求curl_easy_perform(3)同时使用相同的easy_handle。如果你打算传输一个以上的文件,你甚至鼓励这样做。libcurl将试图使用相同的连接的传输,从而使作品‐tions更快,更少的CPU密集使用较少的网络资源。只是注意,你将不得不使用curl_easy_setopt(3)之间的调用为以下curl_easy_perform设置选项。

你必须调用这个函数同时使用相同的easy_handle两地。让函数返回前先调用另一个时间。如果你想要并行传输,必须使用多个卷easy_handles。

而easy_handle添加到多处理,不能用curl_easy_perform(3)。

返回值:
curle_ok(0)意味着一切都是好的,非零均值发生错误 <curl/curl.h> 定义见libcURL错误(3)。如果我‐lopt_errorbuffer(3)是集curl_easy_setopt(3)会有一个可读的错误的错误消息时,非零返回缓冲区。

范例
CURL *curl = curl_easy_init();
if(curl) {
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}

请参考
curl_easy_init(3), curl_easy_setopt(3), curl_multi_add_handle(3), curl_multi_perform(3), libcurl-errors(3),

libcurl 7.7      5 Mar 2001      curl_easy_perform(3)

原文:

 curl_easy_perform()                                           libcurl Manual                                           curl_easy_perform()

 NAME
curl_easy_perform - perform a blocking file transfer SYNOPSIS
#include <curl/curl.h> CURLcode curl_easy_perform(CURL *easy_handle); DESCRIPTION
Invoke this function after curl_easy_init() and all the curl_easy_setopt() calls are made, and will perform the transfer as
described in the options. It must be called with the same easy_handle as input as the curl_easy_init() call returned. curl_easy_perform() performs the entire request in a blocking manner and returns when done, or if it failed. For non-blocking behav‐
ior, see curl_multi_perform(). You can do any amount of calls to curl_easy_perform() while using the same easy_handle. If you intend to transfer more than one
file, you are even encouraged to do so. libcurl will then attempt to re-use the same connection for the following transfers, thus
making the operations faster, less CPU intense and using less network resources. Just note that you will have to use
curl_easy_setopt() between the invokes to set options for the following curl_easy_perform. You must never call this function simultaneously from two places using the same easy_handle. Let the function return first before
invoking it another time. If you want parallel transfers, you must use several curl easy_handles. While the easy_handle is added to a multi handle, it cannot be used by curl_easy_perform(). RETURN VALUE
CURLE_OK () means everything was ok, non-zero means an error occurred as <curl/curl.h> defines - see libcurl-errors(). If the CUR‐
LOPT_ERRORBUFFER() was set with curl_easy_setopt() there will be a readable error message in the error buffer when non-zero is
returned. EXAMPLE
CURL *curl = curl_easy_init();
if(curl) {
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
} SEE ALSO
curl_easy_init(), curl_easy_setopt(), curl_multi_add_handle(), curl_multi_perform(), libcurl-errors(), libcurl 7.7 Mar curl_easy_perform()

man curl_easy_perform(原创)的更多相关文章

  1. 【原创分享·支付宝支付】HBuilder打包APP调用支付宝客户端支付

    前言 最近有点空余时间,所以,就研究了一下APP支付.前面很早就搞完APP的微信支付了,但是由于时间上和应用上的情况,支付宝一直没空去研究.然后等我空了的时候,发现支付宝居然升级了支付逻辑,虽然目前还 ...

  2. 【原创分享·微信支付】C# MVC 微信支付教程系列之现金红包

            微信支付教程系列之现金红包           最近最弄这个微信支付的功能,然后扫码.公众号支付,这些都做了,闲着无聊,就看了看微信支付的其他功能,发现还有一个叫“现金红包”的玩意,想 ...

  3. 【原创分享·微信支付】 C# MVC 微信支付教程系列之扫码支付

    微信支付教程系列之扫码支付                  今天,我们来一起探讨一下这个微信扫码支付.何为扫码支付呢?这里面,扫的码就是二维码了,就是我们经常扫一扫的那种二维码图片,例如,我们自己添 ...

  4. 【原创分享·微信支付】 C# MVC 微信支付教程系列之公众号支付

    微信支付教程系列之公众号支付         今天,我们接着讲微信支付的系列教程,前面,我们讲了这个微信红包和扫码支付.现在,我们讲讲这个公众号支付.公众号支付的应用环境常见的用户通过公众号,然后再通 ...

  5. 【原创分享·微信支付】C# MVC 微信支付之微信模板消息推送

    微信支付之微信模板消息推送                    今天我要跟大家分享的是“模板消息”的推送,这玩意呢,你说用途嘛,那还是真真的牛逼呐.原因在哪?就是因为它是依赖微信生存的呀,所以他能不 ...

  6. [原创]java使用JDBC向MySQL数据库批次插入10W条数据测试效率

    使用JDBC连接MySQL数据库进行数据插入的时候,特别是大批量数据连续插入(100000),如何提高效率呢?在JDBC编程接口中Statement 有两个方法特别值得注意:通过使用addBatch( ...

  7. GJM : C#设计模式汇总整理——导航 【原创】

    感谢您的阅读.喜欢的.有用的就请大哥大嫂们高抬贵手"推荐一下"吧!你的精神支持是博主强大的写作动力以及转载收藏动力.欢迎转载! 版权声明:本文原创发表于 [请点击连接前往] ,未经 ...

  8. 信息安全-5:RSA算法详解(已编程实现)[原创]

    转发注明出处:http://www.cnblogs.com/0zcl/p/6120389.html 背景介绍 1976年以前,所有的加密方法都是同一种模式: (1)甲方选择某一种加密规则,对信息进行加 ...

  9. Atitit.你这些项目不都是模板吗?不是原创  集成和整合的方式大总结

    Atitit.你这些项目不都是模板吗?不是原创  集成和整合的方式大总结 1.1. 乔布斯的名言:创新即整合(Creativity is just connecting things).1 1.2. ...

随机推荐

  1. 九、数据库——sql server 2008导入excel

    昨天分配给我一个活,让我手动录入新闻网页的数据,包括每条新闻的标题.时间和链接. 一开始,就是按照最原始的手动录入的方法,一条条的录入.发现这简直就是在浪费时间,于是就想了一种新方法. 1.将网页中的 ...

  2. AX7: Overlayering and extensions

    Customization: Overlayering and extensions https://ax.help.dynamics.com/en/wiki/customization-overla ...

  3. js获取项目根目录的方法

    getRootPath = function(){ //获取当前网址,如: http://localhost:8080/ems/Pages/Basic/Person.jsp var curWwwPat ...

  4. 英语学习app分析

    以下数据分析由队员张波收集整理队员链接 队友的博客 一.数据统计 为了让统计数据更加准确可信,我们选取了三款android平台的应用市场软件作为数据的来源. 英语学习app下载量统计表: 序号 应用名 ...

  5. cs107

    基本类型:bool,char,short,int,long,float,double 对于char,short,int,long: 多字节类型赋值给少字节类型,对低字节的细节感兴趣,位模式拷贝. 少字 ...

  6. leetcode 172

    172. Factorial Trailing Zeroes Given an integer n, return the number of trailing zeroes in n!. Note: ...

  7. archlinux配置答疑

    Q: chinese can not appear in my firefox and terminal rightly A: pacman -S wqy-microhei Q: install pi ...

  8. 关于char的定义语句,正确的有()

    A.char c = "a";       不对,char只能是单引号 B.char c = '\'';       对,\'是转义字符,为'单引号 C.chae c='cafe' ...

  9. 25. vm安装redhat步骤

    详见:http://jingyan.baidu.com/article/49ad8bce532c525834d8fa19.html

  10. Socket原理与编程基础

    一.Socket简介 Socket是进程通讯的一种方式,即调用这个网络库的一些API函数实现分布在不同主机的相关进程之间的数据交换. 几个定义: (1)IP地址:即依照TCP/IP协议分配给本地主机的 ...