Re: libcurl LDAP in asyncmod

2021-05-02 Thread Fulup Ar Foll via curl-library
Patrick, It is not as clear as that, if you have a wrong LDAP request schema, ldap returned code is also store into msg->result, when in my opinion this is an LDAP protocol error. In any case it allows to retrieve an classify low level errors as: invalid-credential, invalid-request, ...

Re: libcurl LDAP in asyncmod

2021-05-01 Thread Fulup Ar Foll via curl-library
established and no data return). May be in a futture version . Have a nice weekend. Fulup On 01/05/2021 00:47, Daniel Stenberg wrote: On Fri, 30 Apr 2021, Fulup Ar Foll via curl-library wrote: +  curl_multi_info_read return CURLMSG_DONE Allow me to quote curl_multi_info_read.3

Re: libcurl LDAP in asyncmod

2021-04-30 Thread Fulup Ar Foll via curl-library
That's not the response I was hoppingh for, but I will do with it. Thank you and have a nice weekend. Fulup On 30/04/2021 17:17, Patrick Monnerat via curl-library wrote: On 4/30/21 4:58 PM, Fulup Ar Foll via curl-library wrote: curl_easy_getinfo(httpRqt->easy, CURLINFO_RESPONSE_C

libcurl LDAP in asyncmod

2021-04-30 Thread Fulup Ar Foll via curl-library
I try to use libcurl for retrieving group list from a user from C/API.  It works both in synchronous and asynchronous, nevertheless in asynchronous mode, status is not position when credential are wrong  in asynchrounous: curl_easy_perform return

Re: curl_multi_timeout and the multi_socket API

2021-04-05 Thread Fulup Ar Foll via curl-library
Henrik, I confirm what Daniel said. If you take 100% of CPU your logic is obviously wrong. If you run with a main loop, it is up to your your code to select which socket is ready for reading. From your mainloop callback your should

Re: curl_multi_timeout and the multi_socket API

2021-04-05 Thread Fulup Ar Foll via curl-library
Daniel, Good response, anyone can improve the documentation. I wrote a mainloop sample, but a good doc would be far better. I note your point about improving the doc :) Fulup On 04/04/2021 23:24, Daniel Stenberg wrote: On Sun, 4 Apr 2021, Fulup Ar Foll wrote: It is clear that mainloop

Re: curl_multi_timeout and the multi_socket API

2021-04-04 Thread Fulup Ar Foll via curl-library
Henrik, It is clear that mainloop event model with libcurl would deserve a better documentation/samples. It also took me a while to get a working model. Unfortunately when googleling you find mostly lost people or worse bad implementations.

Re: curl_multi_timeout and the multi_socket API

2021-04-03 Thread Fulup Ar Foll via curl-library
I'm not sure to understand your logic. If you have to call curl_multi_timeout() at each iteration of your mainloop your logic should be wrong. I also mix curl-socket with multiple other classes of sockets and do no call call curl_multi_timeout() at

Re: curl_multi_timeout and the multi_socket API

2021-04-03 Thread Fulup Ar Foll via curl-library
Henrik, I posted this sample on github because I lost too many hours searching for curl logic in the documentation. You have to respect curl_timeout, nevertheless if your mainloop works well, it should be call only once per download. In my case I do

Re: curl_multi_timeout and the multi_socket API

2021-04-03 Thread Fulup Ar Foll via curl-library
Henrik, Curl timeout and mainloop timer as in my sample with libuv, epool, ... are completely independent. Curl handle its own timer to remind you when you're supose to do some action. But as soon transfert start you only handle communication go

Re: curl_multi_timeout and the multi_socket API

2021-04-03 Thread Fulup Ar Foll via curl-library
Henrik, I wrote an example using either sytemd or libuv main loop, it might eventually help you https://github.com/fulup-bzh/libcurl-mainloop Fulup On 02/04/2021 23:08, Henrik Holst via curl-library wrote:

Re: asynchronous/mainloop C-API template/model

2021-02-10 Thread Fulup Ar Foll via curl-library
community in order other member not to loose 2 days like I did :) Fulup On 10/02/2021 11:19, Daniel Stenberg wrote: On Wed, 10 Feb 2021, Fulup Ar Foll via curl-library wrote: - big request (13MB) async mode is 6.5 faster (8s vs 53s) - small request (1KB) async mode is 30 time faster (0.62s vs

Re: asynchronous/mainloop C-API template/model

2021-02-10 Thread Fulup Ar Foll via curl-library
Jame, Added a test command and fixed big request issue. https://github.com/fulup-bzh/libcurl-mainloop For 50 http-get - big request (13MB) async mode is 6.5 faster (8s vs 53s) - small request (1KB) async mode is 30 time faster (0.62s vs 19.8s) Test done on my laptop with a 1Gb Internet

Re: asynchronous/mainloop C-API template/model

2021-02-09 Thread Fulup Ar Foll via curl-library
wrote: On Tue, Feb 9, 2021 at 12:56 PM Fulup Ar Foll via curl-library <curl-library@cool.haxx.se> wrote: Hi, I posted on github a template for libcurl asynchronous usage with

asynchronous/mainloop C-API template/model

2021-02-09 Thread Fulup Ar Foll via curl-library
Hi, I posted on github a template for libcurl asynchronous usage with libuv+libsystemd mainloop abstraction: https://github.com/fulup-bzh/libcurl-mainloop . While I spend in significant time searched documentation and web, I best case found partial information and worse case invalid model.