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:[EMAIL PROTECTED] Sent: Wednesday, November 08, 2006 11:18 AM To: HttpClient User Discussion; Paranoid Subject: Re: have question about buffer size --- Paranoid <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
