curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Doubt regarding the use of linux namespaces in Libcurl

From: Dan Fandrich via curl-library <curl-library_at_cool.haxx.se>
Date: Tue, 5 Mar 2019 07:57:20 +0100

On Tue, Mar 05, 2019 at 12:01:29PM +0530, Vipin P R via curl-library wrote:
> Hi,
>     I am looking for a way to bind an easy handle or a multi handle of libcurl
> to a particular linux namespace for every request. Is there some way in libcurl
> to do this internally. If not, can you please guide me how to do this using C
> language. 

You can use the CURLOPT_OPENSOCKETFUNCTION option to set a callback function
that takes care of opening sockets. Each socket can be opened any way the
code desires and then its handle is returned to libcurl.

>>> Dan
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2019-03-05