cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Detecting request completion with asynchronous interface

From: Jeff Pohlmeyer <yetanothergeek_at_gmail.com>
Date: Mon, 9 Mar 2009 13:48:02 -0500

On Mon, Mar 9, 2009, bp.personal_at_gmail.com wrote:

> Using one multi handle becomes a little more complicated
> because I would need my own map of CURL* -> user data.
> (I don't see a way to store such information in the CURLM
> that would be available from curl_multi_info_read().)

Maybe I don't understand what you're saying here, but the
CURLMsg* struct returned by curl_multi_info_read() contains
an "easy_handle" field that refers to the current CURL*.

If you need to associate some external data with an easy handle,
you can set it with curl_easy_setopt(CURLOPT_PRIVATE) and retrieve
it later with curl_easy_getinfo(CURLINFO_PRIVATE)

- Jeff
Received on 2009-03-09