cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How to cleanly close the curl socket in case of multi interface?

From: nikhil ap <niks3089_at_gmail.com>
Date: Sun, 21 Sep 2014 22:58:50 +0530

"libcurl doesn't expose connections much and there's no way to identify a
certain connection anyway with like an ID or something."

Thanks I just wanted to confirm that. I guess one way I use a hash map
between local port and connection object and I can identify which
connection it belongs to based on local ip which i retrieve using
curl_easy_getinfo.

I guess it's additional work but it shouldn't be time consuming.

On Sun, Sep 21, 2014 at 9:30 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:

> On Sun, 21 Sep 2014, nikhil ap wrote:
>
> ConnInfo according to me is a TCP connection object which defined by
>> <soure ip, dest ip, source port, dest port> and should have just a single
>> socket attached to it.
>>
>
> libcurl does its separation based on the name used in the URL though, not
> IP address.
>
> Why I need to maintain connection level stats and bother about connection?
>> Simple answer, it's a requirement! :-)
>>
>
> The question was why you have such a weird requirement. But I guess it
> really doesn't matter.
>
> How will know for which *TCP* connection an easy handle is used?
>>
>
> libcurl doesn't expose connections much and there's no way to identify a
> certain connection anyway with like an ID or something.
>
>
> --
>
> / daniel.haxx.se
> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-library
> Etiquette: http://curl.haxx.se/mail/etiquette.html
>

-- 
niks

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-09-21