curl-library
Re: CURL and CULM data structure
Date: Fri, 28 Oct 2016 17:14:21 -0400
On 10/28/2016 11:58 AM, Miloš Ljumović wrote:
> I think what you're looking for is this:
>
> /* This is the struct known as CURLM on the outside */
> struct Curl_multi {
> /* First a simple identifier to easier detect if a user mix up
> this multi handle with an easy handle. Set this to
> CURL_MULTI_HANDLE. */
> long type;
Although I know the OP intends to do this for debugging purposes, I'd be
loathe not to say that the layout of those internal structs can change
between versions and it is not recommended to access them directly. You
might consider a failsafe by checking
curl_version_info(CURLVERSION_NOW)->version_num to make sure it's the
same as the version you pulled the multi struct from. There's an example
of just listing the easy handles in a multi at [1]. The proper way
though in a case like that is really to keep your own list as you add
and remove handles.
[1]: https://gist.github.com/jay/5b68c1bde985b1b2d23f2b583a26e5ad
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-10-28