Re: Forcing curl_multi_perform() to return regularly

2021-01-21 Thread Jiahao XU via curl-library
How about using a different thread/process for the task that needs to be done regularly? Then you will be able to execute the tasks regularly no matter what happens in libcurl. Get Outlook for iOS From: curl-library on behalf of Andreas

Re: Forcing curl_multi_perform() to return regularly

2021-01-19 Thread Jiahao XU via curl-library
Perhaps you can use curl_easy_pause to pause a connection? Or you can return a special value CURL_READFUNC_PAUSE or CURL_WRITEFUNC_PAUSE in the callback function to paise the connection. Get Outlook for iOS From: curl-library on behalf of

Re: libcurl read-like interface

2020-12-25 Thread Jiahao XU via curl-library
io_uring might take us into a future where no syscall only memory writes has to be made from within libcurl and the user of libcurl can take control of submitting io requests to the kernel completely. It is a technology that might requires libcurl to be redesigned as it is a new io request

Re: libcurl read-like interface

2020-12-25 Thread Jiahao XU via curl-library
Just wondering, do you take io_uring into account when designing this new interface? io_uring is a game-changing asynchronous io syscall that allows multiple io requests to be submitted at once. If you are designing new interface, must take this into account. Get Outlook for

Re: How to use libcurl to login to Spotify ?

2020-07-21 Thread Jiahao XU via curl-library
There’s also some pros and cons I forgot to mention in the last email: Option 1 will give you the maximum speed and minimum dependencies, disk storage and memory consumption. But if spotify changes how the login machnism works, then you have to rewrite that part of login. However, I don’t

Re: How to use libcurl to login to Spotify ?

2020-07-21 Thread Jiahao XU via curl-library
IMHO, there’s two directions you can go: 1. Try to understand what the JavaScript is doing and reproduce it using libcurl; 2. Use selenium to control chrome to enter username and password and login. 3. Find a C/C++ library that can run JavaScript and run the JavaScript downloaded by libcurl

Re: Getting CAPTCHA response when download a webpage

2020-07-20 Thread Jiahao XU via curl-library
Then I don’t know what is missing, too. Get Outlook for iOS From: Mah. E. Sent: Monday, July 20, 2020 6:44:31 PM To: Jiahao XU Cc: libcurl development ; curl-us...@cool.haxx.se Subject: Re: Getting CAPTCHA response when download a

Re: Getting CAPTCHA response when download a webpage

2020-07-20 Thread Jiahao XU via curl-library
I think I know why curl’s output is so different to chrome: The request header is different. To be specific, I think it is probably the mime types that matters. Chrome might have sent out mime types it supported in the requested header, the signal that html5 video player or something like that

Re: Getting CAPTCHA response when download a webpage

2020-07-20 Thread Jiahao XU via curl-library
You seemed to have a typo: it should be captcha, not capcha. Get Outlook for iOS From: Mah. E. Sent: Monday, July 20, 2020 8:18:09 PM To: Jiahao XU Cc: libcurl development ; curl-us...@cool.haxx.se Subject: Re: Getting CAPTCHA response

Re: Getting CAPTCHA response when download a webpage

2020-07-20 Thread Jiahao XU via curl-library
IMHO it could be user agent and cookies affecting the output. I set useragent to “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36” and got 9393 bytes of output. However, when I tried with wget, I got 403 forbidden. Get Outlook for

call curl_multi_socket_action on different sockfd multithread

2020-07-06 Thread Jiahao XU via curl-library
Hello I wonder that is it thread-safe to call `curl_multi_socket_action` on the same multi handler, but different `sockfd` in a multithreaded manner? Get Outlook for iOS --- Unsubscribe: