Old 18th February 2005, 19:26   #1
azmoviez
Junior Member
 
Join Date: Feb 2005
Posts: 2
Inetload - Re-Get temp file?

I keep reading that NSIS InetLoad has simple re-get ability. Does it create a temp file or anything. I can't seem to find any documentation about the levels of re-get.
azmoviez is offline   Reply With Quote
Old 19th February 2005, 05:40   #2
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
InetLoad re-get is simple - if connection was lost it makes pause, reconnects to server and continue reading from current position. This continues till EOF or 0 bytes received after last connect (or connection attempt failed). No temp files - directly to target file in the single IO thread. It is possible to make more refined algorithm, but I am not sure this is really need here.
Takhir is offline   Reply With Quote
Old 19th February 2005, 12:26   #3
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
I think azmoviez wants to know if you can resume downloads with it, ie if the internet drops out while downloading a 500mB file.

-Stu
Afrow UK is offline   Reply With Quote
Old 19th February 2005, 14:38   #4
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
May be I misunderstood something, but I see 2 common situations - short time server/transfer errors and long time local net/dial-up connection problems. In the first case program can successfully reconnect and resume transfer after short pause (fixed parameter, 5 sec in #define), for long lasting problems this has not sense - user should not wait so long (may be hours) during installation. Finally 500 MB is not a problem to download, I used similar programs for 2-3 GB video clips (it was absolutely impossible for users to download these files without re-get), real problem is to copy big temp file from another drive or combine file from few parts - system may become unavailable for a long time during file operations (on the same drive copy happens faster). And this is why plug-in writes directly to the file user sets in command line.
This option is always enabled.
Takhir is offline   Reply With Quote
Old 19th February 2005, 16:43   #5
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
My internet cuts out quite often, and it takes me hours to download 500mB even though I'm on ADSL. I used to be on 56k and it'd take me a day to download just 40mB!

It would still be a very useful addition if you'd ever feel like adding it. A pause button would also be very handy, but not as much so.

-Stu
Afrow UK is offline   Reply With Quote
Old 19th February 2005, 22:29   #6
azmoviez
Junior Member
 
Join Date: Feb 2005
Posts: 2
Afro UK has it. Pretty much a resume download button or functionality would be fantastic. We have users that are still on dial up and have 120MB to download. Packets end up getting lost sometimes as well because of the slow connection. Is there any NSIS info on packet loss?
azmoviez is offline   Reply With Quote
Old 19th February 2005, 23:07   #7
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
If it's just one main file that they're downloading, I recommend that you have a text file on your webserver which contains the file's MD5 value. This file can be downloaded in quite mode and the MD5 is read from it like so:

Push $R0
FileOpen $R0 "$EXEDIR\temp" r
FileRead $R0 $R1
FileClose $R0
Pop $R0

Just make sure that when you put your MD5 in there check that you don't have a newline character (Enter) on the end.

You can then use the NSIS MD5 plugin (from the archive); get the downloaded files' MD5 value and compare. Obviously if the files differ, then you'll have to give them a message saying so and a 'would you like to re-download message' along with it.

I have a simple app to get MD5 value of a selected file if you want it.

-Stu
Afrow UK is offline   Reply With Quote
Old 20th February 2005, 07:03   #8
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
I am using dial-up at home, so I feel the problem L Even my 8 Mbit office connection sometimes dies. I see following /RESUME feature (auto-disabled in the silent mode): if program cannot connect/reconnect to server, plug-in first asks user (may be He/She forgot to turn on modem). Message box is a decision compatible with all 3 display modes (NSISdl style, msi banner and detailed view), but Message may looks ugly above banner (3-rd level of windows), I’ll test some variants first, may be not right now – I have urgent tasks till the end of month.
Regarding lost packets – who can lose them? Server, TCP or plug-in? Few years ago I wrote ftp backup client for ADIC (big tape libs), test sample included 100,000 files, many GB (INT64 any case), but they never asked me to check data integrity – low level protocols should do this (including packets order). If packet was lost tcp should resend it. Otherwise it generates error and program can try to reconnect or exit with "failed" status.
Takhir is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump