hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Claassen <mclaas...@ocie.net>
Subject RE: have question about buffer size
Date Wed, 08 Nov 2006 18:23:41 GMT
It is my understanding that the network card receives information
asynchronously from the reading stream and can buffer input on its own.  Is
this no true?  If it does buffer, then even though the packets are small it
seems like there might be more to read than just one packet on successive
read().  Is this not true?

Mark
 
-----Original Message-----
From: Tatu Saloranta [mailto:cowtowncoder@yahoo.com] 
Sent: Wednesday, November 08, 2006 11:18 AM
To: HttpClient User Discussion; Paranoid
Subject: Re: have question about buffer size

--- Paranoid <paranoid_@ukr.net> wrote:

> have src file in attachment.
> description: creating buffer with 20 MB size.
> reading and appending readed size into StringBuilder. after reading - 
> show StringBuilder contents. on my machine with Mustang b101 we read 
> about 1440 bytes every time, instead of read 20 MB. have great 
> perfomance problem and need REAL buffer, but dont know what to do...

Why should this be a problem? Over the network, maximum segments you get are
(after removing framing/chunking overhead) probably that 1440 bytes in size,
and httpclient is then returning you as much data as it can efficiently give
at any given time.
You just keep on reading all the data, piece by piece.
That's how streams work; they present an abstraction over what may be (and
often is) packet-based transport channel.

-+ Tatu +-




 
____________________________________________________________________________
________
Sponsored Link

Mortgage rates near 39yr lows. $420k for $1,399/mo. 
Calculate new payment!
http://www.LowerMyBills.com/lre

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message