cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: 421 I can't accept more than 5 connections as the same user

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 6 Jan 2014 23:04:35 +0100 (CET)

On Mon, 6 Jan 2014, Stefano D. Mtangoo wrote:

>> That's not how CURLMOPT_MAXCONNECTS works. You probably want
>> CURLMOPT_MAX_HOST_CONNECTIONS for that, if you insist on that funny design.

> How does it works then? And thanks for pointing the latter. That is what I
> needed. Also I would like to know why you call it funny design, is there a
> better way to handle that? Am yet to be a protocol mavericks :)

The use of massive amounts of handles/connections for a series of actions
against a single server. Given a random FTP server out there, I would think
admins of that server expect each client to use a single control connection
for their activities. Using more than one for ordinary operations could
possibly even be considered to be abusive by some. Additionally, you can't
know how many connections from the same IP other FTP servers will or will not
allow before-hand.

Thus, I would go the safe route and when doing repeated operations against the
server re-use the same single connection. Thus re-use a single easy handle as
soon as its down, serially, until all operations are done.

Now, I don't know your specific requirements or the specifics of the task
you're set out to do so my guesses here may be totally off. I've said mine
now, feel free to follow or reject any advice of mine.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-01-06