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. mysql通过sql文件导入数据时出现乱码的解决办法

    首先在新建数据库时一定要注意生成原数据库相同的编码形式,如果已经生成可以用phpmyadmin等工具再整理一次,防止数据库编码和表的编码不统一造成乱码. 方法一: 通过增加参数 –default-ch ...

  2. 1.5 Eclipse集成开发环境

    1. 格式化nandflash PATH路径优先用前面的 Arm-linux-gdb   # .bashrc   # User specific aliases and functions   ali ...

  3. vs2010通过添加资源文件,修改win32创建的窗口

    1.右键项目的“资源”,新建资源,生成.rc文件 2.进入资源视图创建icon或menu等资源 3.退出资源视图,编译这个.rc文件 4.项目源代码中添加如下几个头文件 #include " ...

  4. 进击的docker 一 : Docker 简介

    Docker简介 1.什么是docker 1.1.docker 起源 开源项目 诞生2013年初 GO语言开发实现 遵从了Apache2.0协议 项目代码在GitHub维护 1.2.docker目标 ...

  5. Access denied for user 'root'@'localhost' (using password:YES)

    版权所有,未经博主允许不得转载. 今天发现服务器mysql连接不上,报 can't connect to mysql server on 'root'@'ip' (61) 照例ssh到服务器,发现my ...

  6. 浅尝辄止——在C++中调用C#的回调函数——COM方式

    这种方式比较简单,给大家分享一下,同时讲一下SafeArray内定义结构体的方法 1. 需求描述 需求是这样的,C++代码和C#代码相互通信(C++一般做服务,C#做客户端),C++一侧准备好数据,然 ...

  7. C++中输入输出的重定向

    重定向,就是: 把 原来的 cin 从键盘输入 改为从文件输入. 把 原来的 cout 向屏幕输出 改为输出到文件. 例如: cin>>line; 原来要从键盘拍入.现在自动到某文件读取, ...

  8. iOS学习之代码块(Block)

    代码块(Block) (1)主要作用:将一段代码保存起来,在需要的地方调用即可. (2)全局变量在代码块中的使用: 全局变量可以在代码块中使用,同时也可以被改变,代码片段如下: ;//注意:全局变量 ...

  9. 在xilinxFPGA上使用microblaze及自写GPIO中断

    很久很久没有更新过博客了,今天来扒一扒FPGA上CPU软核的使用. 主要完成的功能:使用的开发板是nexys 4 DDR,板上有16个switch以及16个LED,需要完成microblaze对led ...

  10. SqlLocalDB使用笔记

    一.介绍 SqlLocalDB是VS安装时附带的数据库软件,相当于精简版的SQL Express. 二.使用 VS版本为2015,默认安装位置为:C:\Program Files\Microsoft ...