curl-library
Re: curl multi + CURLOPT_INTERFACE + bind connection
Date: Mon, 4 Feb 2019 16:42:53 +0300
clarification:
i want create pool N of isolated http/2 connections to one host by
socks proxy.
for isolate this connections on multi-handle i use different
CURLOPT_INTERFACE (127.x.x.x) option for each N connection.
this connections store on multi-cache, and when i create new
connections with same CURLOPT_INTERFACE i guaranted retrieve separate
connection from cache (or new if dead)
yes?
Yes you can. Assuming of course that those IP addresses work to use as source
addresses.
On Mon, Feb 4, 2019 at 4:11 PM Daniel Stenberg <daniel_at_haxx.se> wrote:
>
> On Mon, 4 Feb 2019, name via curl-library wrote:
>
> > Can I rely on the CURLOPT_INTERFACE option to guaranteed binding (reuse)
> > some connection?
> >
> > CURL* session1 = curl_easy_setopt(easy, CURLOPT_INTERFACE, "127.0.0.1");
> > CURL* session2 = curl_easy_setopt(easy, CURLOPT_INTERFACE, "127.0.0.2");
> >
> > on repeated calls (exclude errors) will always be same, like:
> >
> > session1 re-use existing connection #1
> > session2 re-use existing connection #2
>
> Yes you can. Assuming of course that those IP addresses work to use as source
> addresses.
>
> --
>
> / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-02-04