intermittent download using Stream.Read()

  • Thread starter Thread starter Loane Sharp
  • Start date Start date
L

Loane Sharp

Hi there

I'm downloading data from a remote server to my local disk using
Stream.Read() and Stream.Write() (as previously suggested by Ken Tucker in
this group). By and large the download and local write operations occur
successfully, but frequently the data transfer is "intermittent", ie.
sometimes the connection to the server becomes idle and no data transfer
occurs over the wire. The code eventually resumes execution as if all the
data were downloaded. However, if I point IE to any website, say
www.microsoft.com, while that page is downloading the data transfer using
Stream.Read() resumes.

Any ideas as to the cause?

Best regards
Loane
 
Hi,


Maybe this will help.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncodefun/html/code4fun02282003.asp

Ken
-----------------------
Hi there

I'm downloading data from a remote server to my local disk using
Stream.Read() and Stream.Write() (as previously suggested by Ken Tucker in
this group). By and large the download and local write operations occur
successfully, but frequently the data transfer is "intermittent", ie.
sometimes the connection to the server becomes idle and no data transfer
occurs over the wire. The code eventually resumes execution as if all the
data were downloaded. However, if I point IE to any website, say
www.microsoft.com, while that page is downloading the data transfer using
Stream.Read() resumes.

Any ideas as to the cause?

Best regards
Loane
 
I e-mail Duncan 10 days ago about the BITS program. It won't really give the
user an easy way to show how to resume download or keep the download alive..
It also prints to around 35-40 pages.

There are 100's of articles/code exaples over the Internet far simpler that
the BITS application.

All the user needs to do is to check to see if the file exists, get its
length, remove that total from the filesize & that is the starting position
to resume from.

Two weeks ago, I wrote a small application for Symantec Antivirus 9
Corporate Intelligent Updater Virus Definitions, which uses resume, pause,
cancel etc. & it won't take you long to add the resume code
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top