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