【问题标题】:can I use curl_multi/multi_socket with libevent我可以将 curl_multi/multi_socket 与 libevent 一起使用吗
【发布时间】:2010-09-15 20:13:57
【问题描述】:

我正在使用 libevent2 构建服务器,并且我正在尝试使服务器能够异步使用 libcurl,我想知道如何使用 libevent2 做到这一点。

我希望能够让 curl 发送事件,以便检查当前状态。

更新:我想通了

http://github.com/mathgladiator/node.ocaml/blob/master/ext/sandbox.c

【问题讨论】:

  • 我查看了您的链接,while(CURLM_CALL_MULTI_PERFORM == curl_multi_perform(ce->multi_handle, &(ce->still_running))); 行不会导致您饿死其他 libevent 任务/回调吗?

标签: curl libevent


【解决方案1】:

multi_socket API 被基于事件的系统(例如 libevent)使用,所以是的

【讨论】:

  • 花了一点,但我想通了。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2023-03-25
  • 2020-08-04
  • 2018-10-23
  • 2011-02-22
  • 2021-03-16
  • 2016-11-20
  • 2019-01-25
相关资源
最近更新 更多