Jump to content

Inetget background limitation?


Recommended Posts

Maybe this has been mentioned somewhere, I've tried looking but couldn't find anything.

Using Inetget with background = 1 allows you to have multiple downloads at once, but it seems that you can only have 2 actively downloading at a time.

Is this a limitation or a bug?

I've included some example script just to illustrate my point

global $dls[11], $ol

$dls[1] = InetGet("http://www.stevenharrington.com/youandI/assetts/arkitip.gif","1.gif",1,1)
$dls[2] = InetGet("http://www.stevenharrington.com/youandI/assetts/peacock.gif","2.gif",1,1)
$dls[3] = InetGet("http://www.stevenharrington.com/youandI/assetts/Quilt.gif","3.gif",1,1)
$dls[4] = InetGet("http://www.stevenharrington.com/youandI/assetts/smokin_hot.gif","4.gif",1,1)
$dls[5] = InetGet("http://www.stevenharrington.com/youandI/assetts/Music.gif","5.gif",1,1)
$dls[6] = InetGet("http://www.stevenharrington.com/youandI/assetts/incase.gif","6.gif",1,1)
$dls[7] = InetGet("http://www.stevenharrington.com/youandI/assetts/somehow.gif","7.gif",1,1)
$dls[8] = InetGet("http://www.stevenharrington.com/youandI/assetts/book.jpg","8.jpg",1,1)
$dls[9] = InetGet("http://www.stevenharrington.com/youandI/assetts/un_royaume.jpg","9.jpg",1,1)
$dls[10] = InetGet("http://www.stevenharrington.com/youandI/assetts/thank_you.jpg","10.jpg",1,1)

while 1
    $line = ""
    
    for $i = 1 to 10
        $kb = round(InetGetInfo($dls[$i],0)/1000,0)
        if InetGetInfo($dls[$i],2) = TRUE Then
            $kb = "Done"
        EndIf
        
        $line &= $i & ": " & $kb & "  "

    Next
    if $ol <> $line Then
        $ol = $line
        ToolTip($line,300,300)
    EndIf
    
WEnd

You can see only 2 of the downloads are moving at a time

Note:

- The site is just a random site with images I chose

- I just chose images so one can see the download taking place

- This is not the server limiting 2 connections (Running the program multiple times or using a dl manager allows much more than 2 connections)

edit: Code brackets were incorrect

Edited by hawky358
Link to comment
Share on other sites

Calls are being made to iexplore, and there are probably limits in IE for how many simultaneous downloads are running (or number of connections to one server, etc.). In Firefox, you could check in about:config for things like network.http.pipelining and related settings.

But I'm not sure how you check such things in IE, or if it even supports it.

:idea:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Calls are being made to iexplore, and there are probably limits in IE for how many simultaneous downloads are running (or number of connections to one server, etc.). In Firefox, you could check in about:config for things like network.http.pipelining and related settings.

But I'm not sure how you check such things in IE, or if it even supports it.

Thanks man! :idea:

I haven't used IE in such a long time I forgot it had that limitation (Which was always and still is fixed with a simple registry fix)

This is the key in case you are wondering (Autoit uses the IE7 & earlier settings)

Inside

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings

Add Dword Values

MaxConnectionsPer1_0Server
MaxConnectionsPerServer

both these values should be set to decimal 10 (or whichever limit you want)

Link to comment
Share on other sites

Nice problem resolution and best knowing.

FYI, there is another (dumb) limitation on TCP connections with XP, which you can raise using this. I don't endorse that thing, but I use it and it works without problems.

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

Zedna, should we also mention that if the server limits the number of connections? Should we mention that maybe your router has limitations? Or the modem? Or the ISP? Where do we stop mentioning limitations?

Link to comment
Share on other sites

Zedna, should we also mention that if the server limits the number of connections? Should we mention that maybe your router has limitations? Or the modem? Or the ISP? Where do we stop mentioning limitations?

Valik use only rellevant examples please.

Have you ever heard about ISP using such limit (with such small number)? The same apply for default modem/router limitation.

If the default in Windows XP is such small (2 connections per server) then this should be mentioned by my opinion.

Of course server limits are well known to all I think but these "local" limits aren't.

Edited by Zedna
Link to comment
Share on other sites

Zedna, how do you know the examples aren't relevant? The connection limit on a router running default dd-wrt could hit the maximum TCP/UDP connections if a P2P client is running. That's also possible with a modem. As for the ISP? One word: Comcast. They throttled P2P traffic, what makes you think they or some other company wouldn't try to throttle downloads?

Edited by Valik
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...