cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Stefano D. Mtangoo <mwinjilisti_at_gmail.com>
Date: Tue, 07 Jan 2014 10:27:01 +0300

On 07/01/2014 01:04 asubuhi, Daniel Stenberg wrote:
> 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.
Waoh!
>
> 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.
Its simple FTP Operations (upload/download files and directories with
files and subdirs). The problem for not using this is I run the Ops in
threads which dies after Operation is done so I cannot reuse them. I had
that concept in mind but found it hard to incorporate with threads.

-- 
Stefano D. Mtangoo
Mob: +255 754710410
Twitter: @mtangoo
Web. http://hosannahighertech.co.tz
Linkedin: http://www.linkedin.com/pub/stefano-mtangoo/45/644/281
/The purpose of man is to know his Maker Be known by his Maker
And make his Maker known So that others may know his Maker as their 
Maker(Emeal Zwayne) /

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