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. AUTOIT解决域控普通用户以管理员身份安装软件方法

    windows域管理,本是很好的管理方式,方便的软件分发,权限控制等功能.不过由于我处软件分发总有那么一些电脑没有成功安装,或是新装的电脑安装软件时漏了安装一些软件,而这些软件需要管理员权限安装的,用 ...

  2. mysql日志与备份恢复

    一.mysql日志: mysql的日志种类有很多,常见的有二进制日志,一般查询日志,满查询日志,中继日志,事务日志等,具体信息可以通过 mysql> SHOW GLOBAL VARIABLES ...

  3. STL容器

    啦啦啦,今天听啦高年级学长讲的STL容器啦,发现有好多东西还是有必要记载的,毕竟学长是身经百战的,他在参加各种比赛的时候积累的经验可不是一天两天就能学来的,那个可是炒鸡有价值的啊,啊啊啊啊啊 #inc ...

  4. SDE用户密码到期

    系统使用Arcsde for oracle 11g ,一直使用正常,突然有一天客户打电话说系统中地图不显示了.登陆GIS服务器,发现sde数据已经无法链接,错误提示:“ [ORA-28002: the ...

  5. 诺基亚N900使用技巧

    一直都对 Linux 的掌上终端挺感冒的,最近从闲鱼上入后一台欧版的,开机进行评测和使用.以下经验仅供新手参考. 选择 N900 是有原因的,首先 N900 相对来说比较小巧(作为 MID,对比起手机 ...

  6. python3+ 模块学习 之 subprocess

    subprocess 模块方法: call() check_call() check_output() 以上三个方法用于创建一个子进程,父进程等待子进程结束.若shell = true, 则shell ...

  7. AngularJS-Uncaught Error: [$injector:modulerr]

    我在实验AngularJS-系统代码的配置和翻译的时候遇到了如下图所示的错误: 在JS编程的时候会经常遇到,XXX不是一个函数,XXX未定义等等错误,只要看到和自己编写的代码语句相关的东西直接找到就能 ...

  8. Makefile 使用总结

    参考: [1]. Makefile 使用总结. http://www.cnblogs.com/wang_yb/p/3990952.html

  9. 木马轮播图代码Jq

    效果图(将就一下) <!DOCTYPE html> <html lang="en"> <head> <meta charset=" ...

  10. (转)对《30个提高Web程序执行效率的好经验》的理解

    阅读了博客园发布的IT文章<30个提高Web程序执行效率的好经验>,这30条准则对我们web开发是非常有用的,不过大家可能对其中的一些准则是知其然而不知其所以然. 下面是我对这些准则的理解 ...