curl-library
RE: How to handle errors related to limit on multiple connections from same client
Date: Wed, 13 Aug 2014 11:11:34 +0000
From: Vishakha Vaidya
Sent: Tuesday, August 12, 2014 5:08 PM
To: libcurl development
Subject: How to handle errors related to limit on multiple connections from same client
Hi,
I using CURL multi interface for ftp. The server is external and has a limit on the number of simultaneous connections from the same client, which is unknown. When I am transferring multiple files, some transfers fail because of this limit. How can I best handle this scenario, such that all files are transferred successfully? The error that I get is either CURLE_LOGIN_DENIED or CURLE_RECV_ERROR or CURLE_SEND_ERROR. But these errors can occur in other scenarios as well, like loss of network connection. Is there a single error that indicates failed transfer is due to a limit on the server?
I have a retry logic, which queues the requests identified by the handles and add them again using curl_multi_add_handle.
Thanks and regards,
Vishakha
Can I set CURLMOPT_MAX_HOST_CONNECTIONS to a lower value while in the multi run loop?
Thanks and regards,
Vishakha
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-08-13