Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

WebRequest Set Content-Length for reply?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mark Olbert - 15 Mar 2006 01:56 GMT
I'm writing an app which downloads large files over http. Is there a way to set how large the chunks of data should be that come
back from the server when I create/submit the WebRequest? Or is that totally up to the server?

I've noticed that (in my case, at least), the data that I pull off of the response stream comes in 32KB chunks. But I'm not
specifying that anywhere that I know of.

- Mark
AMercer - 15 Mar 2006 13:00 GMT
> I'm writing an app which downloads large files over http. Is there a way to set how large the chunks of data should be that come
> back from the server when I create/submit the WebRequest? Or is that totally up to the server?

I think that is negotiated between your pc and other elements of the
network, and I don't think you can influence it.  I doubt that the server has
much to say about it either.

> I've noticed that (in my case, at least), the data that I pull off of the response stream comes in 32KB chunks. But I'm not
> specifying that anywhere that I know of.

Somewhere in the process, you instantiate an IO.StreamReader, right?  One of
its constructors takes a buffersize parameter, and readblock takes a count
parameter.  The documentation offers some performance guidance.
Joerg Jooss - 15 Mar 2006 21:39 GMT
Thus wrote Mark,

> I'm writing an app which downloads large files over http. Is there a
> way to set how large the chunks of data should be that come
>
> back from the server when I create/submit the WebRequest? Or is that
> totally up to the server?

That's pretty much up to the server. Only the HTTP version of the client
may have an effect here, but not at a granular level like specifying a certain
chunk size.  

Cheers,
Signature

Joerg Jooss
news-reply@joergjooss.d


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.