curl_multi_info_read - read multi stack informationals
读取multi stack中的信息

SYNOPSIS
#include <curl/curl.h>
CURLMsg *curl_multi_info_read( CURLM *multi_handle, int *msgs_in_queue);

DESCRIPTION
Ask the multi handle if there are any messages/informationals from the individual transfers. Messages may include informationals such as an error code from the transfer or just the fact that a transfer is completed. More details on these should be written down as well.
向multi handle查询单个传输的是否有messages/informationals。
messages包括error code或传输已完成。

Repeated calls to this function will return a new struct each time, until a NULL is returned as a signal that there is no more to get at this point. The integer pointed to with msgs_in_queue will contain the number of remaining messages after this function was called.
重复调用这个函数,每次会返回一个新的struct,
直到返回NULL时表明当前已经没有信息可以获取了。
第二个参数msgs_in_queue表明经过这次函数调用,还剩下多少消息。

When you fetch a message using this function, it is removed from the internal queue so calling this function again will not return the same message again. It will instead return new messages at each new invoke until the queue is emptied.
当使用这个函数从内部消息队列中取出了一条消息,则再次调用时不会再取到同样的消息。

WARNING: The data the returned pointer points to will not survive calling curl_multi_cleanup, curl_multi_remove_handle or curl_easy_cleanup.
在调用curl_multi_cleanup、curl_multi_remove_handle、curl_easy_cleanup之后,
调用curl_multi_info_read返回的指向数据的指针将不再存在。

The 'CURLMsg' struct is very simple and only contains very basic information. If more involved information is wanted, the particular "easy handle" in present in that struct and can thus be used in subsequent regular curl_easy_getinfo calls (or similar):
CURLMsg只包含了最简单的信息,如果需要更多的信息,
可以使用curl_easy_getinfo函数对CURLMsg结构内的easy_handle取得更多的信息。

struct CURLMsg {
CURLMSG msg; /* what this message means */
CURL *easy_handle; /* the handle it concerns */
union {
void *whatever; /* message-specific data */
CURLcode result; /* return code for transfer */
} data;
};

When msg is CURLMSG_DONE, the message identifies a transfer that is done, and then result contains the return code for the easy handle that just completed.
当CURLMsg中的CURLMSG msg为CURLMSG_DONE,表明传输已经完成,
并且包含完成的easy handle的return code.

At this point, there are no other msg types defined.
除此之外,没有定义其他消息类型。

RETURN VALUE
返回值
A pointer to a filled-in struct, or NULL if it failed or ran out of structs. It also writes the number of messages left in the queue (after this read) in the integer the second argument points to.
一个指向结构体的指针,或者当创建结构体失败时指针为NULL。
并且第二个参数msgs_in_queue表示内部消息队列中剩余的消息数。

[译]curl_multi_info_read的更多相关文章

  1. RxJS + Redux + React = Amazing!(译一)

    今天,我将Youtube上的<RxJS + Redux + React = Amazing!>翻译(+机译)了下来,以供国内的同学学习,英文听力好的同学可以直接看原版视频: https:/ ...

  2. Entity Framework 6 Recipes 2nd Edition 译 -> 目录 -持续更新

    因为看了<Entity Framework 6 Recipes 2nd Edition>这本书前面8章的翻译,感谢china_fucan. 从第九章开始,我是边看边译的,没有通读,加之英语 ...

  3. RxJS + Redux + React = Amazing!(译二)

    今天,我将Youtube上的<RxJS + Redux + React = Amazing!>的后半部分翻译(+机译)了下来,以供国内的同学学习,英文听力好的同学可以直接看原版视频: ht ...

  4. 「译」JUnit 5 系列:条件测试

    原文地址:http://blog.codefx.org/libraries/junit-5-conditions/ 原文日期:08, May, 2016 译文首发:Linesh 的博客:「译」JUni ...

  5. CSharpGL(31)[译]OpenGL渲染管道那些事

    CSharpGL(31)[译]OpenGL渲染管道那些事 +BIT祝威+悄悄在此留下版了个权的信息说: 开始 自认为对OpenGL的掌握到了一个小瓶颈,现在回头细细地捋一遍OpenGL渲染管道应当是一 ...

  6. [译]基于GPU的体渲染高级技术之raycasting算法

    [译]基于GPU的体渲染高级技术之raycasting算法 PS:我决定翻译一下<Advanced Illumination Techniques for GPU-Based Volume Ra ...

  7. Entity Framework 6 Recipes 2nd Edition(9-4)译->Web API 的客户端实现修改跟踪

    9-4. Web API 的客户端实现修改跟踪 问题 我们想通过客户端更新实体类,调用基于REST的Web API 服务实现把一个对象图的插入.删除和修改等数据库操作.此外, 我们想通过EF6的Cod ...

  8. Entity Framework 6 Recipes 2nd Edition(10-1)译->非Code Frist方式返回一个实体集合

    存储过程 存储过程一直存在于任何一种关系型数据库中,如微软的SQL Server.存储过程是包含在数据库中的一些代码,通常为数据执行一些操作,它能为数据密集型计算提高性能,也能执行一些为业务逻辑. 当 ...

  9. 「译」JUnit 5 系列:扩展模型(Extension Model)

    原文地址:http://blog.codefx.org/design/architecture/junit-5-extension-model/ 原文日期:11, Apr, 2016 译文首发:Lin ...

随机推荐

  1. HTML5调用传感器的资料汇总

    都可以调用:devicetemperature(温度).devicepressure(压力).devicehumidity(湿度).devicelight(光).devicenoise(声音).dev ...

  2. JSTL-XML标签库

    主页:http://www.cnblogs.com/EasonJim/p/6958992.html的分支页. 一.<x:out> <x:out>标签显示XPath表达式的结果, ...

  3. M2Crypto

    M2Crypto = Python + OpenSSL + SWIG M2Crypto is a crypto and SSL toolkit for Python. 上面是M2Crypto的READ ...

  4. no matching function transform?

    http://stackoverflow.com/questions/19876746/stdtolower-and-visual-studio-2013 http://forums.codeguru ...

  5. 014 DNS

    解析主机名 Router>en Password: Router#config t Enter configuration commands, one per line.  End with C ...

  6. VM虚拟机的网卡模式介绍

    (1)Bridged方式 用这种方式,虚拟系统的IP可设置成与本机系统在同一网段,虚拟系统相当于网络内的一台.独立的机器,与本机共同插在一个Hub上,网络内其他机器可访问虚拟系统,虚拟系统也可访问网络 ...

  7. AutoCAD菜单加载失败 找不到文件mnc 怎么办

    菜单加载失败,找不到文件 SWFILECONV(mnu/mns/mnc)   找到CAD安装目录下的swfileconv.arx文件,用记事本打开,清空内容,然后保存即可.  

  8. mbed试玩—高速开发MCU应用(基于FRDM-KL25Z)

    mbed试玩 曾经參加一个站点的小小的比赛获得了一块Freescale的FRDM-KL25Z开发板.今天拿出来试玩的时候,插入电脑(板子连接OpenSDA接口)识别出一个128MB的虚拟磁盘,然后打开 ...

  9. cocos2dx-3.0(21) 移植android平台 说多了都是泪

    ----我的生活,我的点点滴滴! ! 网上3.0的教程真心少.能够说没有吧,大多都是2.x 或者 3.0測试版之类的,因为我心大,没有照着2.x去搞,后来搞完后总结了一下,发觉事实上3.0的移植and ...

  10. PHP在浏览器上跟踪调试的方法以及使用ChromePhp、FirePHP的简介

    之前用ThinkPHP时发现有个 trace 函数能够跟踪调试,感觉非常有意思.网上搜索了下类似的东西.发现了 ChromePhp ,曾经没想过这样来调试 PHP 程序.感觉非常方便,非常实用. Th ...