cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Multi-threaded connection re-use

From: Peter Kakoma <kakomap_at_gmail.com>
Date: Sat, 11 Oct 2014 13:09:57 +0300

On Sat, Oct 11, 2014 at 12:51 PM, Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Sat, 11 Oct 2014, Peter Kakoma wrote:
>
> (I'm CC'ing my response over to the libcurl list so that other interested
> parties get to see what might be happening and can contribute or just be
> informed.)
>
>>> The idea isn't new and we (in the curl project) have thought about before
>>> how it could or should be done, but there's not yet any code in libcurl that
>>> enables it.
>
>
>> I'd love to jump in on implementing support; I need the feature enough to
>> take the steps through what in my head is a steep learning curve. Off to
>> look through the code. Any pointers are more than welcome
>
>
> Excellent!
>
> A few immediate pointers:
>
> 1 - join and discuss details and implementation on the curl-library list, as
> that's where all the libcurl hacking is done. This list (curl-and-php)
> is
> for the PHP binding. (and I'm not a PHP guy, really)
>
> 2 - The API to share connections between handles would be done using the
> share
> interface. Read up how it works today and how it can already share
> things
> between handles as a good introduction.
>
> 3 - See 'struct conncache' and lib/conncache.[ch] for the implementation
> details on how the connection cache works. You basically need a way to
> lock the access and exclusively extract a connection for use, so that
> multiple independent handles can be made to share a single pool.
>
Thanks a lot Daniel; this is very, very helpful. I'll do that

>
> --
>
> / daniel.haxx.se
> _______________________________________________
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php

-- 
http://kakoma.ug
http:somanystories.ug
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2014-10-11