On 08/12/2018 06:55 PM, Daniel Stenberg wrote: > ... > We wouldn't expose internals, either way. If we would > provide the data in an array or struct somehow, that would > be made specifically for exporting purposes. That would be > no difference between providing the data in a callback or > post-transfer in a curl_easy_getinfo() call. > > I think most existing users would presume such data to > become available via curl_easy_getinfo(), like the primary > IP and friends already are.
I'm obvious not that acquainted with curl. I took a glance at the source. Unless I'm mistaken, you are using a renamed addrinfo struct on the inside. Could it lead to problems with multiple threads, if you simply passed a pointer to that (chain of) struct(s) via curl_easy_getinfo? If so, you'd have to copy it (or convert it to something else). Users then probably copy the addresses to an entirely different format anyhow. By using the callback after having resolved the hostname, you'd dispose of this burden. That was my thinking. Given that I still know only very little about curl, however, that train of thought might be entirely off tracks. ;-) ------------------------------------------------------------------- Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library Etiquette: https://curl.haxx.se/mail/etiquette.html
