Using stream HttpRequestClass

A

Alexander Inochkin

Hi!

I'm using HttpRequestClass on .NET and .NET Compact. I made request and get
incomming data.
But data feed is very slow. But I need to get data as early as possible. But
behavior the code under
this two platform is different... On .NET I read all available bytes, less
then BUFFER_SIZE, as they come.
On .NET Compact (emulator and real device) I get BUFFER_SIZE bytes as first
result. I wait until all bytes
up to BUFFER_SIZE will be read...

How can I get behavior on .NET Compact like on .NET?
I need to get all available bytes without waiting filling all buffer....


Example of code:

HttpWebResponse resp = ...;
Stream responseStream = resp.GetResponseStream();
responseStream.BeginRead(buffer, 0, BUFFER_SIZE, new
AsyncCallback(ReadCallBack), ...);


private void ReadCallBack(IAsyncResult asyncResult)
{
...
int readCount = responseStream.EndRead( asyncResult );

}
 
T

Tian Min Huang

Hello Alexander,

Thanks for your post. Currently I am finding resources and trying to assist
you on this issue. We will update you as soon as possible.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
S

Scot Rose [MSFT]

Hi Alex,

You would probably be most likely to get an answer to this in the microsoft.public.dotnet.framework.compactframework newsgroup as
there will most likely be a larger pool of respondants that are familiar with the Compact Framework.


Scot Rose, MCSD
Microsoft Visual Basic Developer Support
Email : (e-mail address removed) <Remove word online. from address>

This posting is provided “AS IS”, with no warranties, and confers no rights.

Get Secure!
http://www.microsoft.com/security
http://www.microsoft.com/protect


--------------------
 

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

Top