On Thu, Mar 23, 2017 at 8:24 PM, doa379 <[email protected]> wrote:
> I'm trying to integrate libuv with libcurl.
> The uv_poll_start function uses the callback function curl_perform whenever
> (action) events call for polling IN and OUT like so:
>
> switch (action)
> {
>   case CURL_POLL_INOUT:
>     uv_poll_start(&curl_context->poll_handle, events, curl_perform);
>     break;
> }
>
> Is it possible to use a different callback function or pass additional
> parameters to it?

You can set curl_context->poll_handle.data to a pointer or use a
container_of-like macro to obtain the enclosing curl_context in your
uv_poll_cb callback.

-- 
You received this message because you are subscribed to the Google Groups 
"libuv" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/libuv.
For more options, visit https://groups.google.com/d/optout.

Reply via email to